[Django] #25047: "Conflicting migrations detected" error in makemigrations is rather unhelpful

73 views
Skip to first unread message

Django

unread,
Jul 2, 2015, 8:23:07 AM7/2/15
to django-...@googlegroups.com
#25047: "Conflicting migrations detected" error in makemigrations is rather
unhelpful
--------------------------------------------+--------------------
Reporter: nip3o | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Core (Management commands) | Version: 1.8
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 1 | UI/UX: 0
--------------------------------------------+--------------------
If you run makemigrations and have more than one migration which no other
migration depend upon (a leaf in the dependency graph), you will get the
following error

{{{
Conflicting migrations detected [0001_migration_a, 0002_migration_b]. To
fix them run python manage.py makemigrations --merge
}}}

I believe that it is hard to find the cause of this error without looking
at the implementation of the checker
(https://github.com/django/django/blob/bc77eb6d0858652e197c08c299efaeb06c51efee/django/db/migrations/loader.py#L325).

I suggest that we change "Conflicting migrations detected" to something
like "There can only be one migration which are not depended upon by
another migration". I would be happy to submit a PR.

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

Django

unread,
Jul 2, 2015, 11:56:41 AM7/2/15
to django-...@googlegroups.com
#25047: "Conflicting migrations detected" error in makemigrations is rather
unhelpful
--------------------------------------+------------------------------------

Reporter: nip3o | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Migrations | Version: 1.8
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

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

* needs_better_patch: => 0
* needs_docs: => 0
* component: Core (Management commands) => Migrations
* needs_tests: => 0
* stage: Unreviewed => Accepted


Comment:

Do you think something like "Conflicting migrations detected (multiple
leaf nodes in the migration graph)." would be better?

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

Django

unread,
Jul 3, 2015, 1:45:54 PM7/3/15
to django-...@googlegroups.com
#25047: "Conflicting migrations detected" error in makemigrations is rather
unhelpful
--------------------------------------+------------------------------------
Reporter: nip3o | Owner: mossplix
Type: Cleanup/optimization | Status: assigned

Component: Migrations | Version: 1.8
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

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

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


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

Django

unread,
Aug 20, 2015, 7:29:42 PM8/20/15
to django-...@googlegroups.com
#25047: "Conflicting migrations detected" error in makemigrations is rather
unhelpful
--------------------------------------+------------------------------------
Reporter: nip3o | Owner: mossplix
Type: Cleanup/optimization | Status: assigned
Component: Migrations | Version: 1.8
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

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

* has_patch: 0 => 1


Comment:

[https://github.com/django/django/pull/5165 PR]

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

Django

unread,
Aug 23, 2015, 10:23:02 AM8/23/15
to django-...@googlegroups.com
#25047: "Conflicting migrations detected" error in makemigrations is rather
unhelpful
-------------------------------------+-------------------------------------
Reporter: nip3o | Owner: mossplix
Type: | Status: assigned
Cleanup/optimization |

Component: Migrations | Version: 1.8
Severity: Normal | Resolution:
Keywords: | Triage Stage: Ready for
| checkin

Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

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

* stage: Accepted => Ready for checkin


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

Django

unread,
Aug 24, 2015, 8:06:04 AM8/24/15
to django-...@googlegroups.com
#25047: "Conflicting migrations detected" error in makemigrations is rather
unhelpful
-------------------------------------+-------------------------------------
Reporter: nip3o | Owner: mossplix
Type: | Status: closed

Cleanup/optimization |
Component: Migrations | Version: 1.8
Severity: Normal | Resolution: fixed

Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham <timograham@…>):

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


Comment:

In [changeset:"45ed19de687d324d3ba852eea93b1afa575e482f" 45ed19de]:
{{{
#!CommitTicketReference repository=""
revision="45ed19de687d324d3ba852eea93b1afa575e482f"
Fixed #25047 -- Improved "Conflicting migrations" error message.
}}}

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

Reply all
Reply to author
Forward
0 new messages