#28052: Django inadvertently removes all indexes when switching to
db_index=False
---------------------------------------------+------------------------
Reporter: Markus Holtermann | Owner: nobody
Type: Bug | Status: new
Component: Migrations | Version: 1.11
Severity: Release blocker | Keywords:
Triage Stage: Accepted | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
---------------------------------------------+------------------------
1. Create a model with `data = JSONField(db_index=True)`; makemigrations;
migrate
1. Add a `GinIndex(fields=['data'], name='foo')` to `_meta.indexes`;
makemigrations; migrate
1. Remove `db_index=True` from the `JSONField`; makemigrations; migrate
After step 2 there will be a Gin index on the `data` column on the model.
After step 3 there's _no_ index on the `data` column anymore.
--
Ticket URL: <https://code.djangoproject.com/ticket/28052>
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 post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/050.17d4625b57e64d03a1492165254b2b95%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.