From: Mike Bayer Date: Tue, 10 Feb 2015 01:32:53 +0000 (-0500) Subject: - add a fix to MySQL re: #3074 tests, make sure we check table is present X-Git-Tag: rel_1_0_0b1~63 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0843bbcfbb4ab57253e8de424b7b1b7538ba0781;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git - add a fix to MySQL re: #3074 tests, make sure we check table is present --- diff --git a/lib/sqlalchemy/dialects/mysql/base.py b/lib/sqlalchemy/dialects/mysql/base.py index 8d62bae026..0a999a85fa 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')