#36168: migration plan in the context of squashmigrations has too many leaves
------------------------------------+--------------------------------------
     Reporter:  Klaas van Schelven  |                    Owner:  (none)
         Type:  Uncategorized       |                   Status:  closed
    Component:  Migrations          |                  Version:  5.1
     Severity:  Normal              |               Resolution:  needsinfo
     Keywords:                      |             Triage Stage:  Unreviewed
    Has patch:  0                   |      Needs documentation:  0
  Needs tests:  0                   |  Patch needs improvement:  0
Easy pickings:  0                   |                    UI/UX:  0
------------------------------------+--------------------------------------
Comment (by Klaas van Schelven):

 The reason this was somewhat hard to reproduce cleanly is the following:

 Per my original report:

 > the graph contains leaf nodes for both the original and squashed paths,
 which means that some things in the project-state-creation happen doubly,
 which fails.

 ''however'', there's also
 
[https://github.com/django/django/blob/1330cb570519170bb4397b4fb02c7e3e0657855a/django/db/migrations/state.py#L120
 this code], which is the adding of a model to a project's state. That code
 does not bother to check whether a given model already exist, which means
 that the things happening doubly doesn't trigger an error if both paths
 start with creating a model, for the simple reason that the model is
 simply overwritten.

 That might actually be a separate bug...
-- 
Ticket URL: <https://code.djangoproject.com/ticket/36168#comment:3>
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 view this discussion visit 
https://groups.google.com/d/msgid/django-updates/01070194d053c026-577d6b1b-7cd3-4873-a853-b8d70f42b7ae-000000%40eu-central-1.amazonses.com.

Reply via email to