-
-
Notifications
You must be signed in to change notification settings - Fork 239
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
drop_constraint not working for primary key sqlite3 #402
Comments
Changes by Anthony Ryan (@anthonyryan1):
|
Anthony Ryan (@anthonyryan1) wrote: Just to elaborate on this issue, I also attempted the following without success:
|
Michael Bayer (@zzzeek) wrote: there's a bug here however your usage is invalid. drop_constraint() accepts the name of the constraint, not the name of the first column that's part of that constraint. Works as follows:
the primary key is still being regenerated here due to a different issue, fix working through at https://gerrit.sqlalchemy.org/262 . |
Michael Bayer (@zzzeek) wrote: Ensure primary_key flag unset for PK batch drop Fixed bug where doing Change-Id: I20c04860b151ac86466337f0522018be06c6feec → a8b292e |
Changes by Michael Bayer (@zzzeek):
|
Joel Tio (@joeltio) wrote: This still seems to be a problem in alembic 0.9.10, tested on SQLite 3.23.1. Minimal Example:
When I
Notice that the primary key id is retained. |
Michael Bayer (@zzzeek) wrote: please repost to a new bug |
Joel Tio (@joeltio) wrote: Reposted to a new issue: https://bitbucket.org/zzzeek/alembic/issues/502/sqlite3-retains-primary-key-after-dropping |
Migrated issue, originally created by Anthony Ryan (@anthonyryan1)
Tested on sqlite 3.15.2 with alembic git master.
Minimal test case
Prepare test table
Drop primary key
Expected result
Actual result
The text was updated successfully, but these errors were encountered: