From a0fb35eb726f1a04eaa1b47b8de191fafe55a0ab Mon Sep 17 00:00:00 2001 From: Jacob Walls Date: Sun, 30 Mar 2025 08:18:18 -0400 Subject: Fixed #36184 -- Allowed migrating forward to squashed migrations. --- tests/migrations/test_commands.py | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'tests') diff --git a/tests/migrations/test_commands.py b/tests/migrations/test_commands.py index 3b4da2bbb7..00f97c5f3a 100644 --- a/tests/migrations/test_commands.py +++ b/tests/migrations/test_commands.py @@ -1328,6 +1328,16 @@ class MigrateTests(MigrationTestBase): # Unmigrate everything. call_command("migrate", "migrations", "zero", verbosity=0) + @override_settings( + MIGRATION_MODULES={"migrations": "migrations.test_migrations_squashed"} + ) + def test_migrate_forward_to_squashed_migration(self): + try: + call_command("migrate", "migrations", "0001_initial", verbosity=0) + finally: + # Unmigrate everything. + call_command("migrate", "migrations", "zero", verbosity=0) + @override_settings( MIGRATION_MODULES={"migrations": "migrations.test_migrations_squashed"} ) -- cgit v1.3