#29063: Replacement Migrations not being executed because of unapplied 
migrations
should raise a warning.
------------------------------------------------+------------------------
               Reporter:  Julian Schneider      |          Owner:  nobody
                   Type:  Cleanup/optimization  |         Status:  new
              Component:  Migrations            |        Version:  1.9
               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                     |
------------------------------------------------+------------------------
 In Line 205-208 in django/db/migrations/loader.py replacement migrations
 (created with squash) are checked if they can be applied. If any of the to
 be replaced migrations isn't already applied the replacement migration is
 not added to the nodes list.

 This leads to the fact that if some of the migrations are removed or not
 completely applied before the squash is added and there is a dependency on
 the replacement migration, the user gets a 'NodeNotFoundError' where the
 replacement migration that is not being applied because of line 206 is the
 missing one.

 This is very confusing to the user, raising a warning in line 208 would
 inform the user that the squashed migration can not be applied because not
 all the 'child' migrations are applied.

 Had to debug into that to figure that out.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/29063>
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/058.888a0d0f84c2a197c67c6bc9bcb4dd19%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to