diff options
| author | Derek Harland <derek.harland@finq.co.nz> | 2012-12-04 14:48:37 +1300 |
|---|---|---|
| committer | Derek Harland <derek.harland@finq.co.nz> | 2012-12-04 14:48:37 +1300 |
| commit | f4b0735f72c7fa69092ffa97dba4de7015938364 (patch) | |
| tree | 0b02e3264753574362f948fd7e85dab190c7a283 /lib/sqlalchemy | |
| parent | a10b60bbb9986ea9db8ac235de932c087b94fda1 (diff) | |
| download | sqlalchemy-f4b0735f72c7fa69092ffa97dba4de7015938364.tar.gz | |
MSSQL Dialect should set sequence columns to be non null
Diffstat (limited to 'lib/sqlalchemy')
| -rw-r--r-- | lib/sqlalchemy/dialects/mssql/base.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/sqlalchemy/dialects/mssql/base.py b/lib/sqlalchemy/dialects/mssql/base.py index 0f862f10b..127e5da79 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" |
