mirror of
https://github.com/django/django.git
synced 2025-10-23 21:59:11 +00:00
Fixed #23953 -- Made makemigrations continue number sequence for squashed migrations.
This commit is contained in:
committed by
Mariusz Felisiak
parent
6e4ac28af0
commit
15683cdb95
@@ -1956,6 +1956,21 @@ class MakeMigrationsTests(MigrationTestBase):
|
||||
out_value = out.getvalue()
|
||||
self.assertIn('Add field created to book', out_value)
|
||||
|
||||
@override_settings(
|
||||
MIGRATION_MODULES={'migrations': 'migrations.test_migrations_squashed'},
|
||||
)
|
||||
def test_makemigrations_continues_number_sequence_after_squash(self):
|
||||
with self.temporary_migration_module(module='migrations.test_migrations_squashed'):
|
||||
with captured_stdout() as out:
|
||||
call_command(
|
||||
'makemigrations',
|
||||
'migrations',
|
||||
interactive=False,
|
||||
empty=True,
|
||||
)
|
||||
out_value = out.getvalue()
|
||||
self.assertIn('0003_auto', out_value)
|
||||
|
||||
|
||||
class SquashMigrationsTests(MigrationTestBase):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user