Opened 10 years ago
Closed 10 years ago
#24357 closed Bug (duplicate)
Renaming Foreignkey field leaves index
Reported by: | Dan Poirier | Owned by: | nobody |
---|---|---|---|
Component: | Migrations | Version: | 1.7 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Basically, if I start with a field 'field' that is a foreign key with db_index=True (the default), rename it to 'field2', then add a new foreign key named 'field', executing the migration fails when it comes to adding the new field due to a db index already existing that it's trying to create again.
I'll attach a tarball with a minimal Django project and script to recreate it.
I've tried this with Postgres 9.3 and Django 1.7.3 and 1.7.4.
Attachments (1)
Change History (2)
by , 10 years ago
Attachment: | migration_bug.tar.gz added |
---|
comment:1 by , 10 years ago
Resolution: | → duplicate |
---|---|
Status: | new → closed |
Oops, looks like a dup of https://code.djangoproject.com/ticket/23577
Unpack, make a new virtual env, and run ./recreate.sh to recreate the bug