We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Dropping a constraint with spaces using mssql_drop_foreign_key=True will results in an error
mssql_drop_foreign_key=True
The text was updated successfully, but these errors were encountered:
CaselIT has proposed a fix for this issue in the main branch:
Escape sql server constriant names https://gerrit.sqlalchemy.org/c/sqlalchemy/alembic/+/4463
Sorry, something went wrong.
can you explain the issue here? "dropping a ...." what? Can I see what SQL is being emitted that fails?
not sure if im following the SQL correctly but it's selecting a column called name from sys.default_constraints or sys.check_contraints, that is
name
sys.default_constraints
sys.check_contraints
SELECT [name] FROM sys.default_constraints
[name] is a quoted identifier, you wouldn't put QUOTENAME there, and it does not have spaces in it.
[name]
oh I see, QUOTENAME is running on the returned data, fine.
Sorry, the issue is when dropping constraints with names that need escaping. I've filled the missing words on the issue description.
Also this is a failry limited use case, since it affects only the mssql_drop_* kw args
mssql_drop_*
7ebd32d
No branches or pull requests
Dropping a constraint with spaces using
mssql_drop_foreign_key=True
will results in an errorThe text was updated successfully, but these errors were encountered: