Opened 8 years ago
Last modified 8 years ago
#26926 closed Bug
Dual index migration bug? — at Version 3
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 )
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 (3)
comment:1 by , 8 years ago
comment:3 by , 8 years ago
Description: | modified (diff) |
---|
Can you test on master? I believe this was fixed by commit: 9356f63a99957f01c14a9788617428a172a29fcb