-
-
Notifications
You must be signed in to change notification settings - Fork 278
False change for unique constraint with case-sensitive names in 1.4.0 #654
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
Comments
Ok there's no test case for that so need to add one. |
I can't reproduce [edit: got it, doesnt happen on SQLA master]. Can you provide a reproduction case? I think just a CREATE TABLE that is generating the false positives should be enough clue.
in PG the table is created as:
|
Mike Bayer has proposed a fix for this issue in the master branch: Handle mixed case identifiers correctly. https://gerrit.sqlalchemy.org/1709 |
that's just my test, will run it against multiple PG versions to confirm no issue so far. |
oh, well duh, the whole issue that was fixed with that logic didn't happen in master :) k we're good thanks |
different fix though. names aren't supposed to be quoted here. |
PostgreSQL, a unique constraint with uppercase letters in name.
_compare_indexes_and_uniques
takes name as_constraint_sig.name
(just the name without quotes) for constraint from connection, but as_constraint_sig.md_name_to_sql_name(context)
(gives the name in double quotes) for constraint from metadata. That causes false changes detection with script that drops and creates the same constraint.The following change solves the problem:
The text was updated successfully, but these errors were encountered: