#28351: "Conflicting migrations detected" CommandError due to replacement 
Migration
being removed
-----------------------------------------+------------------------
               Reporter:  Daniel Hahler  |          Owner:  nobody
                   Type:  Bug            |         Status:  new
              Component:  Migrations     |        Version:  1.11
               Severity:  Normal         |       Keywords:
           Triage Stage:  Unreviewed     |      Has patch:  0
    Needs documentation:  0              |    Needs tests:  0
Patch needs improvement:  0              |  Easy pickings:  0
                  UI/UX:  0              |
-----------------------------------------+------------------------
 I am getting the following error:
 {{{
 CommandError: Conflicting migrations detected; multiple leaf nodes in the
 migration graph: (0002_initial_models, 0XXX_merge_20170628_1435 in myapp).
 To fix them run 'python manage.py makemigrations --merge'
 }}}

 Running the command results in `No conflicts detected to merge.` however.

 `0002_initial_models` is not actually a leaf node, but `0003_initial_data`
 depends on it.
 `0003_initial_data` however is removed, since it replaces
 `0XXX_merge_20170628_1435`, which is not applied yet and therefore also
 does not show up in `showmigrations`?!
 (it gets removed in
 
https://github.com/django/django/blob/a6756195c1a11eee10c16c96fe95d52e22e1d9ba/django/db/migrations/graph.py#L252)

 I think `0003_initial_data` should still show up in `showmigrations`, but
 with some indication that it replaces other migrations.
 That would happen in case it wasn't removed as a leaf node in
 
https://github.com/django/django/blob/a6756195c1a11eee10c16c96fe95d52e22e1d9ba/django/core/management/commands/showmigrations.py#L82-L83.

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

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/050.1ab087059cdfd47164587f99205e69af%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to