summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/dialects
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2011-01-12 15:49:59 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2011-01-12 15:49:59 -0500
commit0f31f36fe59aa2053271df459fbc3092a0ce599c (patch)
treec34d109f59e7221f1afe88a2b009a4f44abd2f31 /lib/sqlalchemy/dialects
parentc9ebe3b723ecc17bb171343f05534f4fd7c9a9fc (diff)
downloadsqlalchemy-0f31f36fe59aa2053271df459fbc3092a0ce599c.tar.gz
- dont count server_default absense as part of autoincrement, PG
will have a value here upon reflection. - mysql, others will have to check "server_default" when rendering special keywords like AUTOINCREMENT
Diffstat (limited to 'lib/sqlalchemy/dialects')
-rw-r--r--lib/sqlalchemy/dialects/mysql/base.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/sqlalchemy/dialects/mysql/base.py b/lib/sqlalchemy/dialects/mysql/base.py
index 61dd99b85..8b8380471 100644
--- a/lib/sqlalchemy/dialects/mysql/base.py
+++ b/lib/sqlalchemy/dialects/mysql/base.py
@@ -1309,7 +1309,7 @@ class MySQLDDLCompiler(compiler.DDLCompiler):
elif column.nullable and is_timestamp and default is None:
colspec.append('NULL')
- if column is column.table._autoincrement_column:
+ if column is column.table._autoincrement_column and column.server_default is None:
colspec.append('AUTO_INCREMENT')
return ' '.join(colspec)