mirror of
https://github.com/django/django.git
synced 2025-08-04 10:59:45 +00:00
Fixed #23953 -- Made makemigrations continue number sequence for squashed migrations.
This commit is contained in:
parent
6e4ac28af0
commit
15683cdb95
3 changed files with 25 additions and 1 deletions
|
@ -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):
|
||||
"""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue