From: Derek Harland Date: Tue, 4 Dec 2012 01:48:37 +0000 (+1300) Subject: MSSQL Dialect should set sequence columns to be non null X-Git-Tag: rel_0_8_0~34^2~1^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f4b0735f72c7fa69092ffa97dba4de7015938364;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git MSSQL Dialect should set sequence columns to be non null --- diff --git a/lib/sqlalchemy/dialects/mssql/base.py b/lib/sqlalchemy/dialects/mssql/base.py index 0f862f10bb..127e5da797 100644 --- a/lib/sqlalchemy/dialects/mssql/base.py +++ b/lib/sqlalchemy/dialects/mssql/base.py @@ -1018,7 +1018,8 @@ class MSDDLCompiler(compiler.DDLCompiler): + self.dialect.type_compiler.process(column.type)) if column.nullable is not None: - if not column.nullable or column.primary_key: + if not column.nullable or column.primary_key or \ + isinstance(column.default, sa_schema.Sequence): colspec += " NOT NULL" else: colspec += " NULL"