--- /dev/null
+.. change::
+ :tags: bug, mssql, reflection
+ :tickets: 10504
+ :versions: 2.0.23
+
+ Fixed issue where identity column reflection would fail
+ for a bigint column with a large identity start value
+ (more than 18 digits).
cache_ok = True
def column_expression(self, colexpr):
- return cast(colexpr, Numeric)
+ return cast(colexpr, Numeric(38, 0))
identity_columns = Table(
),
),
Column("id2", Integer, Identity()),
- Column("id3", sqltypes.BigInteger, Identity()),
+ Column(
+ "id3",
+ sqltypes.BigInteger,
+ Identity(start=-9223372036854775808),
+ ),
Column("id4", sqltypes.SmallInteger, Identity()),
Column("id5", sqltypes.Numeric, Identity()),
]
eq_(type(col["identity"]["start"]), int)
eq_(type(col["identity"]["increment"]), int)
elif col["name"] == "id3":
- eq_(col["identity"], {"start": 1, "increment": 1})
+ eq_(
+ col["identity"],
+ {"start": -9223372036854775808, "increment": 1},
+ )
eq_(type(col["identity"]["start"]), util.compat.long_type)
eq_(type(col["identity"]["increment"]), util.compat.long_type)
elif col["name"] == "id4":