﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
36141	After double squashing migrate command fails with InconsistentMigrationHistory	Jacob Walls	Georgi Yanchev	"Ticket #24529 implemented the possibility to squash squashed migrations.

To reproduce this issue, make four migrations, migrate, squash the first two, then squash the first three: then migrate (or makemigrations --check) fails.

{{{#!shell
manage.py makemigrations myapp --empty
manage.py makemigrations myapp --empty
manage.py makemigrations myapp --empty
manage.py makemigrations myapp --empty
manage.py migrate
manage.py squashmigrations myapp 0001 0002
manage.py squashmigrations myapp 0001_initial_squashed 0003
manage.py migrate
}}}

{{{
django.db.migrations.exceptions.InconsistentMigrationHistory: Migration myapp.0004_auto_20250126_1339 is applied before its dependency new.0001_initial_squashed_0002_auto_20250126_1339_squashed_0003_auto_20250126_1339 on database 'default'.
}}}

Other migration commands can be subbed for that last call and still produce the same error, e.g. `makemigrations --check`, which is likely in a CI setting."	Bug	closed	Migrations	6.0	Release blocker	fixed		Georgi Yanchev	Ready for checkin	1	0	0	0	0	0
