diff options
| -rw-r--r-- | lib/sqlalchemy/dialects/mysql/base.py | 3 |
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') |
