mirror of
https://github.com/django/django.git
synced 2025-08-31 15:57:45 +00:00
Fixed #25250 -- Clarified partially recorded state of squashed migrations in showmigrations --list.
This commit is contained in:
parent
de4f620183
commit
2dfc1066a0
2 changed files with 17 additions and 1 deletions
|
@ -928,6 +928,15 @@ class MigrateTests(MigrationTestBase):
|
|||
recorder = MigrationRecorder(connection)
|
||||
recorder.record_applied("migrations", "0001_initial")
|
||||
recorder.record_applied("migrations", "0002_second")
|
||||
out = io.StringIO()
|
||||
call_command('showmigrations', 'migrations', stdout=out, no_color=True)
|
||||
self.assertEqual(
|
||||
"migrations\n"
|
||||
" [-] 0001_squashed_0002 (2 squashed migrations) "
|
||||
"run 'manage.py migrate' to finish recording.\n",
|
||||
out.getvalue().lower(),
|
||||
)
|
||||
|
||||
out = io.StringIO()
|
||||
call_command("migrate", "migrations", verbosity=0)
|
||||
call_command("showmigrations", "migrations", stdout=out, no_color=True)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue