#27520: sqlmigrate generates a duplicate DROP INDEX statement (migrate works
fine)
--------------------------------------------+------------------------
Reporter: Jerome Leclanche | Owner: nobody
Type: Uncategorized | Status: new
Component: Uncategorized | Version: 1.10
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
--------------------------------------------+------------------------
I just removed `db_index=True` on a CharField I no longer want indexed, on
postgresql, Django 1.10. The migration runs fine (it removes both the
_like and regular index), but when I run `sqlmigrate` it actually
generates *three* "DROP INDEX" statements instead of two: one of the two
is duplicated.
Results of sqlmigrate:
{{{
BEGIN;
--
-- Alter field real_name on globalgameplayer
--
DROP INDEX "games_globalgameplayer_real_name_7e583535_like";
DROP INDEX "games_globalgameplayer_real_name_7e583535_uniq";
DROP INDEX "games_globalgameplayer_real_name_7e583535_like";
COMMIT;
}}}
Of course, running this doesn't work. Simply running `migrate` however
will work fine.
Reference commit:
https://github.com/HearthSim/HSReplay.net/commit/cdbae94d0bf397c1c9d6362d847e0ca120f0385b
--
Ticket URL: <https://code.djangoproject.com/ticket/27520>
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/047.94c1b5e3e2a5cdb82f5ff01c846d688f%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.