]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
- add a fix to MySQL re: #3074 tests, make sure we check table is present
authorMike Bayer <mike_mp@zzzcomputing.com>
Tue, 10 Feb 2015 01:32:53 +0000 (20:32 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Tue, 10 Feb 2015 01:32:53 +0000 (20:32 -0500)
lib/sqlalchemy/dialects/mysql/base.py

index 8d62bae026111d744f4c74b860fac2985aaa7cbc..0a999a85fa113f91573e11dbdd25a4b8a3c4f6a1 100644 (file)
@@ -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')