summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2015-02-09 20:32:53 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2015-02-09 20:32:53 -0500
commit0843bbcfbb4ab57253e8de424b7b1b7538ba0781 (patch)
tree309277048e3487b9b519e0837e6559038126763e
parent8750596c110a284b290e22f6911fd02096a51665 (diff)
downloadsqlalchemy-0843bbcfbb4ab57253e8de424b7b1b7538ba0781.tar.gz
- add a fix to MySQL re: #3074 tests, make sure we check table is present
-rw-r--r--lib/sqlalchemy/dialects/mysql/base.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/sqlalchemy/dialects/mysql/base.py b/lib/sqlalchemy/dialects/mysql/base.py
index 8d62bae02..0a999a85f 100644
--- a/lib/sqlalchemy/dialects/mysql/base.py
+++ b/lib/sqlalchemy/dialects/mysql/base.py
@@ -1878,7 +1878,8 @@ class MySQLDDLCompiler(compiler.DDLCompiler):
if default is not None:
colspec.append('DEFAULT ' + default)
- if column is column.table._autoincrement_column and \
+ if column.table is not None \
+ and column is column.table._autoincrement_column and \
column.server_default is None:
colspec.append('AUTO_INCREMENT')