Opened 8 years ago

Closed 8 years ago

#26926 closed Bug (duplicate)

Dual index migration bug?

Reported by: Vladimir Owned by: nobody
Component: Migrations Version: 1.9
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 (last modified by Vladimir)

Example:

1) Added new field to model
x_index = models.BooleanField(default=True, db_index=True, unique=True)
There is an unnecessary index. But the conditions of the situation.

2) Create and run the migration.
In the database this field will have only one index - unique.

3) Change the field.
x_index = models.BooleanField(default=True, db_index=True)
Remove the unique index.

4) Create and run the migration.
Now, this field doesn't have of any indexes in database.

p.s. Mysql database

Change History (5)

comment:1 by Jon Dufresne, 8 years ago

Can you test on master? I believe this was fixed by commit: 9356f63a99957f01c14a9788617428a172a29fcb

comment:2 by Vladimir, 8 years ago

Bug reproduced in 1.10 RC1

comment:3 by Vladimir, 8 years ago

Description: modified (diff)

comment:4 by Vladimir, 8 years ago

In version "1.11" on the 4 step, the index was created.

comment:5 by Tim Graham, 8 years ago

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