[Django] #27165: CreateModel without indexes always includes options={'indexes': []}

2 views
Skip to first unread message

Django

unread,
Sep 1, 2016, 9:41:22 AM9/1/16
to django-...@googlegroups.com
#27165: CreateModel without indexes always includes options={'indexes': []}
------------------------------------------------+------------------------
Reporter: timgraham | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Migrations | Version: master
Severity: Normal | Keywords: 1.11
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
------------------------------------------------+------------------------
If you create a model without any indexes, the `CreateModel` operation
always includes:
{{{
options={
'indexes': [],
},
}}}
It would be nice to avoid that, if possible.

--
Ticket URL: <https://code.djangoproject.com/ticket/27165>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Sep 1, 2016, 9:54:51 AM9/1/16
to django-...@googlegroups.com
#27165: CreateModel without indexes always includes options={'indexes': []}
--------------------------------------+------------------------------------

Reporter: timgraham | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Migrations | Version: master
Severity: Normal | Resolution:
Keywords: 1.11 | Triage Stage: Accepted

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by timgraham):

* stage: Unreviewed => Accepted


--
Ticket URL: <https://code.djangoproject.com/ticket/27165#comment:1>

Django

unread,
Sep 1, 2016, 1:31:53 PM9/1/16
to django-...@googlegroups.com
#27165: CreateModel without indexes always includes options={'indexes': []}
--------------------------------------+------------------------------------

Reporter: timgraham | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Migrations | Version: master
Severity: Normal | Resolution:
Keywords: 1.11 | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by akki):

A related comment (and the place where not having this default would cause
problems) - https://github.com/django/django/pull/6726#discussion-
diff-66307466

--
Ticket URL: <https://code.djangoproject.com/ticket/27165#comment:2>

Django

unread,
Sep 1, 2016, 1:49:52 PM9/1/16
to django-...@googlegroups.com
#27165: CreateModel without indexes always includes options={'indexes': []}
--------------------------------------+------------------------------------

Reporter: timgraham | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Migrations | Version: master
Severity: Normal | Resolution:
Keywords: 1.11 | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by claudep):

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

--
Ticket URL: <https://code.djangoproject.com/ticket/27165#comment:3>

Django

unread,
Sep 18, 2016, 3:32:44 AM9/18/16
to django-...@googlegroups.com
#27165: CreateModel without indexes always includes options={'indexes': []}
--------------------------------------+------------------------------------
Reporter: timgraham | Owner: akki
Type: Cleanup/optimization | Status: assigned
Component: Migrations | Version: master

Severity: Normal | Resolution:
Keywords: 1.11 | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by akki):

* owner: nobody => akki
* status: new => assigned


Comment:

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

--
Ticket URL: <https://code.djangoproject.com/ticket/27165#comment:4>

Django

unread,
Sep 18, 2016, 5:14:37 AM9/18/16
to django-...@googlegroups.com
#27165: CreateModel without indexes always includes options={'indexes': []}
--------------------------------------+------------------------------------
Reporter: timgraham | Owner: akki
Type: Cleanup/optimization | Status: assigned
Component: Migrations | Version: master

Severity: Normal | Resolution:
Keywords: 1.11 | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by akki):

* has_patch: 0 => 1


Comment:

https://github.com/django/django/pull/7262/

--
Ticket URL: <https://code.djangoproject.com/ticket/27165#comment:5>

Django

unread,
Sep 19, 2016, 10:17:39 AM9/19/16
to django-...@googlegroups.com
#27165: CreateModel without indexes always includes options={'indexes': []}
--------------------------------------+------------------------------------
Reporter: timgraham | Owner: akki
Type: Cleanup/optimization | Status: closed
Component: Migrations | Version: master
Severity: Normal | Resolution: fixed

Keywords: 1.11 | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by Tim Graham <timograham@…>):

* status: assigned => closed
* resolution: => fixed


Comment:

In [changeset:"358c6f21f8107d830a2f285d49d69bac24a98bdd" 358c6f21]:
{{{
#!CommitTicketReference repository=""
revision="358c6f21f8107d830a2f285d49d69bac24a98bdd"
Fixed #27165 -- Removed unnecessary CreateModel(... 'indexes': []) in
migrations.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/27165#comment:6>

Reply all
Reply to author
Forward
0 new messages