diff options
| author | Jacob Walls <jacobtylerwalls@gmail.com> | 2025-03-30 08:18:18 -0400 |
|---|---|---|
| committer | Sarah Boyce <42296566+sarahboyce@users.noreply.github.com> | 2025-04-01 09:35:37 +0200 |
| commit | a0fb35eb726f1a04eaa1b47b8de191fafe55a0ab (patch) | |
| tree | 8783e5f447feeb4b5201900b1628511ebcee0118 /tests/migrations | |
| parent | 12385b4fa7059aab8e4f671853cc09ae8509501f (diff) | |
Fixed #36184 -- Allowed migrating forward to squashed migrations.
Diffstat (limited to 'tests/migrations')
| -rw-r--r-- | tests/migrations/test_commands.py | 10 |
1 files changed, 10 insertions, 0 deletions
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 @@ -1331,6 +1331,16 @@ class MigrateTests(MigrationTestBase): @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"} + ) def test_migrate_backward_to_squashed_migration(self): try: call_command("migrate", "migrations", "0001_squashed_0002", verbosity=0) |
