-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bigint identity column with large negative seed fails to reflect #10504
Comments
how strange. the value has a cast to numeric |
No, it isn't. The default precision is 18, whereas the maximum precision is 38. |
ok, then I guess the solution is to just change the precision/type we cast to |
I believe a numeric(19,0) will easily cast to bigint in mssql |
the issue I think is that identity can be applied on a numeric column that may be larger than a bigint. Using the max precision available on numeric should be greater than any other integer column available in mssql, so it should solve the issue. |
Gord Thompson has proposed a fix for this issue in the main branch: Fix identity column reflection failure https://gerrit.sqlalchemy.org/c/sqlalchemy/sqlalchemy/+/4909 |
Gord Thompson has proposed a fix for this issue in the rel_1_4 branch: Fix identity column reflection failure https://gerrit.sqlalchemy.org/c/sqlalchemy/sqlalchemy/+/4911 |
Describe the bug
An mssql table with a bigint identity column that has a large negative seed will cause reflection to fail.
Optional link from https://docs.sqlalchemy.org which documents the behavior that is expected
No response
SQLAlchemy Version in Use
2.0.23.dev0
DBAPI (i.e. the database driver)
pyodbc
Database Vendor and Major Version
SQL Server 2019
Python Version
3.10
Operating system
(any)
To Reproduce
Error
Additional context
No response
The text was updated successfully, but these errors were encountered: