From 0843bbcfbb4ab57253e8de424b7b1b7538ba0781 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Mon, 9 Feb 2015 20:32:53 -0500 Subject: [PATCH] - add a fix to MySQL re: #3074 tests, make sure we check table is present --- lib/sqlalchemy/dialects/mysql/base.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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') -- 2.47.2