Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#27004 closed Bug (fixed)

InconsistentMigrationHistory has false positives with squashed migrations

Reported by: Jarek Glowacki Owned by: nobody
Component: Migrations Version: 1.10
Severity: Release blocker Keywords: InconsistentMigrationHistory squashed migrate
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

a -> b -> c

a_sq_b

Migrations a, b, c applied. a_sq_b not.
When graph is built, since a and b are applied, a_sq_b replaces them and becomes c's dependency. However this means that a_sq_b is unapplied while c is. This results in an InconsistentMigrationHistory error when you try to run migrations...

Looks like the results of #25850.

Unless I'm mistaken this seems like quite a critical error..

Change History (5)

comment:1 Changed 3 years ago by Jarek Glowacki

Has patch: set

comment:2 Changed 3 years ago by Markus Holtermann

Triage Stage: UnreviewedAccepted

comment:3 Changed 3 years ago by Simon Charette

Severity: NormalRelease blocker

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

Resolution: fixed
Status: newclosed

In d117567c:

Fixed #27004 -- Made migrations consistency check ignore unapplied squashed migrations.

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

In 1e16e141:

[1.10.x] Fixed #27004 -- Made migrations consistency check ignore unapplied squashed migrations.

Backport of d117567c7d65c3c28858c4dfc771483b182075e4 from master

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