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)

migration_bug.tar.gz (1022 bytes ) - added by Dan Poirier 10 years ago.
Unpack, make a new virtual env, and run ./recreate.sh to recreate the bug

Download all attachments as: .zip

Change History (2)

by Dan Poirier, 10 years ago

Attachment: migration_bug.tar.gz added

Unpack, make a new virtual env, and run ./recreate.sh to recreate the bug

comment:1 by Dan Poirier, 10 years ago

Resolution: duplicate
Status: newclosed
Note: See TracTickets for help on using tickets.
Back to Top