#33488: Django rename migration does not rename the index
-------------------------------------+-------------------------------------
Reporter: Jef D | Owner: nobody
Type: Bug | Status: new
Component: | Version: 4.0
Migrations | Keywords: migration,
Severity: Normal | postgresql
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
I tried to do a rename migration followed by a new field migration. This
new field had the same name as the old field which was renamed.
The second migration failed on Postgres (not on SQLite). After an
inspection it appears that the rename migration left the old index in
place which made the new field migration fail.
Full details in this StackOverflow post:
https://stackoverflow.com/questions/70970039/django-rename-field-and-
create-new-one-with-the-same-name-returns-psycopg2-error/70971693#70971693
I don't know Django migrations well enough to judge if this is a Django
issue or an psycopg issue. Since it occured in Django I will try this one
first.
The current workaround is to manually drop or rename the old index.
--
Ticket URL: <https://code.djangoproject.com/ticket/33488>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/052.ca17331fd36797e6cb14d3bbac52e045%40djangoproject.com.