From 6629d9f89273eda53a578cce41af6c79135254c7 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Sat, 10 Nov 2018 21:36:18 -0500 Subject: Add new parameters for IDENTITY start/increment in mssql Deprecated the use of :class:`.Sequence` with SQL Server in order to affect the "start" and "increment" of the IDENTITY value, in favor of new parameters ``mssql_identity_start`` and ``mssql_identity_increment`` which set these parameters directly. :class:`.Sequence` will be used to generate real ``CREATE SEQUENCE`` DDL with SQL Server in a future release. Fixes: #4362 Change-Id: I1e69378c5c960ff0bc28137c923589692f1a918f --- lib/sqlalchemy/engine/reflection.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'lib/sqlalchemy/engine') diff --git a/lib/sqlalchemy/engine/reflection.py b/lib/sqlalchemy/engine/reflection.py index a572a34f2..841bb4dfb 100644 --- a/lib/sqlalchemy/engine/reflection.py +++ b/lib/sqlalchemy/engine/reflection.py @@ -667,10 +667,15 @@ class Inspector(object): col_kw = dict( (k, col_d[k]) - for k in ['nullable', 'autoincrement', 'quote', 'info', 'key', 'comment'] + for k in [ + 'nullable', 'autoincrement', 'quote', 'info', 'key', + 'comment'] if k in col_d ) + if 'dialect_options' in col_d: + col_kw.update(col_d['dialect_options']) + colargs = [] if col_d.get('default') is not None: default = col_d['default'] -- cgit v1.2.1