-
-
Notifications
You must be signed in to change notification settings - Fork 253
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
Migration tries to delete already-deleted key from deleted column. #247
Comments
Changes by Andrew Magee (@amagee):
|
Michael Bayer (@zzzeek) wrote: OK so two approaches, one is we get constraints to be ignored if an owning column is to be dropped, however, it might be better if we just put the constraint drops above the column and still include them; #232 seems to indicate that MySQL's drop column needs the constraints to be dropped explicitly in any case. |
Michael Bayer (@zzzeek) wrote: also, there is drop_constraint() and drop_index() here for the same name. the PG dialect is supposed to detect that kind of condition so it's....unexpected that it is generating both. but im going to ignore that here. |
Michael Bayer (@zzzeek) wrote:
→ 2cdff3d |
Michael Bayer (@zzzeek) wrote:
→ 360b8b9 |
Changes by Michael Bayer (@zzzeek):
|
Michael Bayer (@zzzeek) wrote: OK I found that one and i fixed that also. |
Migrated issue, originally created by Andrew Magee (@amagee)
I'm using PostgreSQL. I deleted a non-nullable column from a table, which generated a migration like this:
But the second line, the
drop_constraint
, throws an exception because the "cuser_username_key" constraint no longer exists at that point. It seems that thedrop_column
call deletes it, because the constraint does actually exist if I inspect the table.The text was updated successfully, but these errors were encountered: