mirror of
https://github.com/django/django.git
synced 2025-08-04 02:48:35 +00:00
Fixed #27044 -- Included already applied migration changes in the post-migrate state when the execution plan is empty.
Refs #24100. Thanks tkhyn for the report and Tim for the review.
This commit is contained in:
parent
ad25fe7350
commit
d1757d8df4
5 changed files with 36 additions and 8 deletions
|
@ -113,3 +113,13 @@ class MigrateSignalTests(TransactionTestCase):
|
|||
[model._meta.label for model in post_migrate_receiver.call_args['apps'].get_models()],
|
||||
['migrate_signals.Signal']
|
||||
)
|
||||
# Migrating with an empty plan.
|
||||
post_migrate_receiver = Receiver(signals.post_migrate)
|
||||
management.call_command(
|
||||
'migrate', database=MIGRATE_DATABASE, verbosity=MIGRATE_VERBOSITY,
|
||||
interactive=MIGRATE_INTERACTIVE, stdout=stdout,
|
||||
)
|
||||
self.assertEqual(
|
||||
[model._meta.label for model in post_migrate_receiver.call_args['apps'].get_models()],
|
||||
['migrate_signals.Signal']
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue