#23577: Rename operations should rename indexes, constraints, sequences and
triggers named after their former value
---------------------------------+------------------------------------
Reporter: Chris Woytowitz | Owner: (none)
Type: Bug | Status: new
Component: Migrations | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------------+------------------------------------
Comment (by Roberto Maurizzi):
Just hit the same problem after renaming a Model and creating a new one
with the old name (to conform to how several other models in that
application ended up being named).
I was able to fix it by:
- changing the new Model creation in the migration to specify
`spatial_index=False` (it was a GIS field, I guess for regular ones you
need to use `db_index=False`)
- running makemigrations again: since I never changed the models, it
detected the missing indexes and created another migration that added them
to the db
This worked both for migrating the production database (was working
earlier too) and when running tests.
--
Ticket URL: <https://code.djangoproject.com/ticket/23577#comment:37>
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/01070189af7e576f-6ceed60e-8e3f-43c2-8d37-6e193f0fef84-000000%40eu-central-1.amazonses.com.