#33734: InconsistentMigrationHistory triggers on squashed migrations when not
all
replaced migrations are applied
-------------------------------------+-------------------------------------
Reporter: | Owner: nobody
GwynBleidD |
Type: Bug | Status: new
Component: | Version: 3.2
Migrations | Keywords: migrations squash
Severity: Normal | inconsistentmigrationhistory
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
#27004 fixed a bug with triggering `InconsistentMigrationHistory` in some
cases but not all of them. For example in migration tree:
{{{
0001_sq_0002
/ \
App A: 0001 ---> 0002
|
App B: 0001
}}}
When only A.0001 and B.0002 are applied
I think
[https://github.com/django/django/blob/main/django/db/migrations/loader.py#L320-L326
fix] applied in #27004 should check if any of migrations replaced are
already applied, not if all of them. When any of them is applied, we are
already on a separate path of applying migration and squash migration will
only be marked as applied, so it should be fine to change it from all to
any.
--
Ticket URL: <https://code.djangoproject.com/ticket/33734>
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 on the web visit
https://groups.google.com/d/msgid/django-updates/01070180f046cb1f-055711b4-2b2e-4b94-857f-a5e1f1f7d1fa-000000%40eu-central-1.amazonses.com.