Opened 8 years ago
Closed 8 years ago
#27165 closed Cleanup/optimization (fixed)
CreateModel without indexes always includes options={'indexes': []}
Reported by: | Tim Graham | Owned by: | Akshesh Doshi |
---|---|---|---|
Component: | Migrations | Version: | dev |
Severity: | Normal | Keywords: | 1.11 |
Cc: | Akshesh Doshi | Triage Stage: | Accepted |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
If you create a model without any indexes, the CreateModel
operation always includes:
options={ 'indexes': [], },
It would be nice to avoid that, if possible.
Change History (6)
comment:1 by , 8 years ago
Triage Stage: | Unreviewed → Accepted |
---|
comment:2 by , 8 years ago
comment:3 by , 8 years ago
For me, having indexes=[]
in ModelState
or in migration files is not necessary the same thing. I didn't explore further, though.
comment:4 by , 8 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
Ahh, I see. I should be able to remove it from the migrations file.
Note:
See TracTickets
for help on using tickets.
A related comment (and the place where not having this default would cause problems) - https://github.com/django/django/pull/6726#discussion-diff-66307466