mirror of
https://github.com/django/django.git
synced 2025-06-07 04:29:12 +00:00
[3.0.x] Isolated migrations.test_commands.MigrateTests.test_migrate_plan.
Backport of 05186c03a30686f4898c1cb9acf4b8613035afcc from master
This commit is contained in:
parent
bab3ad54ff
commit
4a263af64e
@ -327,6 +327,7 @@ class MigrateTests(MigrationTestBase):
|
|||||||
" Raw SQL operation -> ['SELECT * FROM migrations_author']\n",
|
" Raw SQL operation -> ['SELECT * FROM migrations_author']\n",
|
||||||
out.getvalue()
|
out.getvalue()
|
||||||
)
|
)
|
||||||
|
try:
|
||||||
# Migrate to the third migration.
|
# Migrate to the third migration.
|
||||||
call_command('migrate', 'migrations', '0003', verbosity=0)
|
call_command('migrate', 'migrations', '0003', verbosity=0)
|
||||||
out = io.StringIO()
|
out = io.StringIO()
|
||||||
@ -370,6 +371,7 @@ class MigrateTests(MigrationTestBase):
|
|||||||
' Raw SQL operation -> IRREVERSIBLE\n',
|
' Raw SQL operation -> IRREVERSIBLE\n',
|
||||||
out.getvalue()
|
out.getvalue()
|
||||||
)
|
)
|
||||||
|
finally:
|
||||||
# Cleanup by unmigrating everything: fake the irreversible, then
|
# Cleanup by unmigrating everything: fake the irreversible, then
|
||||||
# migrate all to zero.
|
# migrate all to zero.
|
||||||
call_command('migrate', 'migrations', '0003', fake=True, verbosity=0)
|
call_command('migrate', 'migrations', '0003', fake=True, verbosity=0)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user