Add global registration of custom migrations.
Review Request #12268 — Created May 5, 2022 and submitted
Custom migrations are used mainly in unit test suites to dynamically
construct migrations that can be applied to an app. Currently,
EvolveAppTask
accepts these and passes them toMigrationExecutor
.
However, upcoming work will involve creating aMigrationExecutor
outside of the management ofEvolveAppTask
, but with the need to use
the migrations registered there.Now,
EvolveAppTask
registers custom migrations globally when preparing
tasks, and then urnegisters them after tasks have been prepared.This is not thread-safe, but then, evolving the database is not
something that should ever be done by more than one thread (or process,
or server) at a time anyway. Plus this is really intended for unit
testing. So it's not a concern for this purpose.
All unit tests pass.
Tested along with upcoming work for a
MoveToDjangoEvolution
mutation.
Summary | ID |
---|---|
031da376469834a770cbf225c4479b729124be97 |