Add a MigrationExecutor subclass supporting custom migrations and signals.

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

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.

Commits

Files