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 )
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 , 8 years ago
comment:3 by , 8 years ago
Description: | modified (diff) |
---|
comment:5 by , 8 years ago
Resolution: | → duplicate |
---|---|
Status: | new → closed |
Can you test on master? I believe this was fixed by commit: 9356f63a99957f01c14a9788617428a172a29fcb