From f4b0735f72c7fa69092ffa97dba4de7015938364 Mon Sep 17 00:00:00 2001 From: Derek Harland Date: Tue, 4 Dec 2012 14:48:37 +1300 Subject: [PATCH] MSSQL Dialect should set sequence columns to be non null --- lib/sqlalchemy/dialects/mssql/base.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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" -- 2.47.3