From 372a8d76a61649e7952ec9a465c731aa00352363 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Sat, 23 Sep 2006 17:21:56 +0000 Subject: - added autoincrement=True to Column; will disable schema generation of SERIAL/AUTO_INCREMENT/identity seq for postgres/mysql/mssql if explicitly set to False. #303 --- lib/sqlalchemy/databases/mysql.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/sqlalchemy/databases/mysql.py') diff --git a/lib/sqlalchemy/databases/mysql.py b/lib/sqlalchemy/databases/mysql.py index 74821707f..f833489d2 100644 --- a/lib/sqlalchemy/databases/mysql.py +++ b/lib/sqlalchemy/databases/mysql.py @@ -439,7 +439,7 @@ class MySQLSchemaGenerator(ansisql.ANSISchemaGenerator): if not column.nullable: colspec += " NOT NULL" if column.primary_key: - if not column.foreign_key and first_pk and isinstance(column.type, sqltypes.Integer): + if not column.foreign_key and first_pk and column.autoincrement and isinstance(column.type, sqltypes.Integer): colspec += " AUTO_INCREMENT" return colspec -- cgit v1.2.1