[Django] #25601: makemigrations create unnecessary migrations

5 views
Skip to first unread message

Django

unread,
Oct 23, 2015, 6:46:37 AM10/23/15
to django-...@googlegroups.com
#25601: makemigrations create unnecessary migrations
-------------------------------+--------------------
Reporter: vstoykov | Owner: nobody
Type: Uncategorized | Status: new
Component: Migrations | Version: 1.8
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------
When verbose name of model or field is changed or some validator
added/removed this creates unnecessary migrations. These attributes are
not related to database at all and this will create extra migrations which
then need to rebuild the state every time when migrations are run on
validations are processed.

This is extra overhead that potentially can slow all tasks related to
migrations, and also extra noise in version control and also is very
annoying. This state (verbose name, validators and potentially other
attributes) is not needed for datamigrations also.

I saw people to complain about speed of the new migrations framework and I
think that this can help at least a little.

This is not tested it's jut my hypothesis.

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

Django

unread,
Oct 23, 2015, 8:13:31 AM10/23/15
to django-...@googlegroups.com
#25601: makemigrations create unnecessary migrations
-------------------------------+--------------------------------------
Reporter: vstoykov | Owner: nobody
Type: Uncategorized | Status: closed
Component: Migrations | Version: 1.8
Severity: Normal | Resolution: invalid
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------
Changes (by timgraham):

* status: new => closed
* needs_better_patch: => 0
* resolution: => invalid
* needs_tests: => 0
* needs_docs: => 0


Comment:

This is by design, see #22837 and the last paragraph in
[https://docs.djangoproject.com/en/stable/topics/migrations/#the-commands
The Commands] section in the documentation.

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

Reply all
Reply to author
Forward
0 new messages