Opened 4 years ago

Closed 4 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: master
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


If you create a model without any indexes, the CreateModel operation always includes:

    'indexes': [],

It would be nice to avoid that, if possible.

Change History (6)

comment:1 Changed 4 years ago by Tim Graham

Triage Stage: UnreviewedAccepted

comment:2 Changed 4 years ago by Akshesh Doshi

A related comment (and the place where not having this default would cause problems) -

comment:3 Changed 4 years ago by Claude Paroz

For me, having indexes=[] in ModelState or in migration files is not necessary the same thing. I didn't explore further, though.

comment:4 Changed 4 years ago by Akshesh Doshi

Owner: changed from nobody to Akshesh Doshi
Status: newassigned

Ahh, I see. I should be able to remove it from the migrations file.

comment:5 Changed 4 years ago by Akshesh Doshi

Has patch: set

comment:6 Changed 4 years ago by Tim Graham <timograham@…>

Resolution: fixed
Status: assignedclosed

In 358c6f21:

Fixed #27165 -- Removed unnecessary CreateModel(... 'indexes': []) in migrations.

Note: See TracTickets for help on using tickets.
Back to Top