Add a MigrationExecutor subclass supporting custom migrations and signals.

Review Request #10576 — Created June 3, 2019 and submitted

Information

Django Evolution
master

Reviewers

Django's standard MigrationExecutor only worked with on-disk
migrations, which was difficult for testing. We worked around the
limitations by patching some of the generated migration graph, but this
isn't always feasible, and isn't generic enough to use outside of
limited unit tests.

This change introduces a subclass of MigrationExecutor and
MigrationLoader that supports custom migrations, which will not only
be useful for tests but for the upcoming Evolver support.

This subclass also consolidates some important tests (handling Django
version differences in the process) and introduces new signals that will
be emitted during the migration application process.

Unit tests pass on all supported versions of Django.

Summary ID
Add a MigrationExecutor subclass supporting custom migrations and signals.
Django's standard `MigrationExecutor` only worked with on-disk migrations, which was difficult for testing. We worked around the limitations by patching some of the generated migration graph, but this isn't always feasible, and isn't generic enough to use outside of limited unit tests. This change introduces a subclass of `MigrationExecutor` and `MigrationLoader` that supports custom migrations, which will not only be useful for tests but for the upcoming `Evolver` support. This subclass also consolidates some important tests (handling Django version differences in the process) and introduces new signals that will be emitted during the migration application process.
0d2b305ab8fd3530b7a2b3a0e0cbc7a43838c974
Description From Last Updated

E271 multiple spaces after keyword

reviewbotreviewbot
Checks run (1 failed, 1 succeeded)
flake8 failed.
JSHint passed.

flake8

david
  1. Ship It!
  2. 
      
chipx86
Review request changed
Status:
Completed
Change Summary:
Pushed to master (fd546f5)