mirror of
https://github.com/django/django.git
synced 2025-08-30 23:37:50 +00:00
Fixed #27731 -- Implemented CreateModel/AlterFooOperation reduction.
This should alleviate the side effects of disabling the AlterFooOperation reduction with RemoveField to fix refs #28862 during migration squashing because CreateModel can perform a reduction with RemoveField. Thanks Nick Pope for the review.
This commit is contained in:
parent
ed7898e1b5
commit
8e3f22f251
4 changed files with 95 additions and 20 deletions
|
@ -1335,7 +1335,7 @@ class SquashMigrationsTests(MigrationTestBase):
|
|||
out = io.StringIO()
|
||||
with self.temporary_migration_module(module="migrations.test_migrations"):
|
||||
call_command("squashmigrations", "migrations", "0002", interactive=False, verbosity=1, stdout=out)
|
||||
self.assertIn("Optimized from 8 operations to 4 operations.", out.getvalue())
|
||||
self.assertIn("Optimized from 8 operations to 2 operations.", out.getvalue())
|
||||
|
||||
def test_ticket_23799_squashmigrations_no_optimize(self):
|
||||
"""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue