Opened 4 years ago

Closed 3 years ago

#25047 closed Cleanup/optimization (fixed)

"Conflicting migrations detected" error in makemigrations is rather unhelpful

Reported by: Niclas Olofsson Owned by: Moses Mugisha
Component: Migrations Version: 1.8
Severity: Normal Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no


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 makemigrations --merge

I believe that it is hard to find the cause of this error without looking at the implementation of the checker (

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.

Change History (5)

comment:1 Changed 4 years ago by Tim Graham

Component: Core (Management commands)Migrations
Triage Stage: UnreviewedAccepted

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

comment:2 Changed 4 years ago by Moses Mugisha

Owner: changed from nobody to Moses Mugisha
Status: newassigned

comment:3 Changed 3 years ago by Tim Graham

Has patch: set

comment:4 Changed 3 years ago by Markus Holtermann

Triage Stage: AcceptedReady for checkin

comment:5 Changed 3 years ago by Tim Graham <timograham@…>

Resolution: fixed
Status: assignedclosed

In 45ed19de:

Fixed #25047 -- Improved "Conflicting migrations" error message.

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