diff options
| author | Tim Graham <timograham@gmail.com> | 2014-09-24 15:49:30 -0400 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2014-09-24 15:49:30 -0400 |
| commit | d7ab2cefb7ec94bf45d37a02c79b6703ea2880e5 (patch) | |
| tree | 3128fcc9944c6c82360c66efb25f5e57c8ea7c3f /tests/migrations/test_executor.py | |
| parent | a4f23eba2e690f1331fe35d6f29af42899e80395 (diff) | |
Revert "Fixed #23474 -- Prevented migrating backwards from unapplying the wrong migrations."
This reverts commit abcf28a07695a45cb5fb15b81bffc97bea5e0be3.
Diffstat (limited to 'tests/migrations/test_executor.py')
| -rw-r--r-- | tests/migrations/test_executor.py | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/tests/migrations/test_executor.py b/tests/migrations/test_executor.py index 222f1b847e..b8eddc6f97 100644 --- a/tests/migrations/test_executor.py +++ b/tests/migrations/test_executor.py @@ -231,41 +231,3 @@ class ExecutorTests(MigrationTestBase): executor.migrate([("migrations", None)]) self.assertTableNotExists("migrations_author") self.assertTableNotExists("migrations_tribble") - - @override_settings( - MIGRATION_MODULES={ - "migrations": "migrations.test_migrations_backwards_deps_1", - "migrations2": "migrations2.test_migrations_backwards_deps_2", - }, - ) - def test_backwards_deps(self): - """ - #23474 - Migrating backwards shouldn't cause the wrong migrations to be - unapplied. - - Migration dependencies (x -> y === y depends on x): - m.0001 -+-> m.0002 - +-> m2.0001 - - 1) Migrate m2 to 0001, causing { m.0001, m2.0002 } to be applied. - 2) Migrate m to 0001. m.0001 has already been applied, so this should - be a noop. - """ - executor = MigrationExecutor(connection) - executor.migrate([("migrations2", "0001_initial")]) - try: - self.assertTableExists("migrations2_example") - # Rebuild the graph to reflect the new DB state - executor.loader.build_graph() - self.assertEqual( - executor.migration_plan([("migrations", "0001_initial")]), - [], - ) - executor.migrate([("migrations", "0001_initial")]) - self.assertTableExists("migrations2_example") - finally: - # And migrate back to clean up the database - executor.loader.build_graph() - executor.migrate([("migrations", None)]) - self.assertTableNotExists("migrations_author") - self.assertTableNotExists("migrations_tribble") |
