Add a new primary class for handling evolutions.

Review Request #10338 — Created Nov. 29, 2018 and submitted — Latest diff uploaded

chipx86
Django Evolution
master
a06d6b4...
django-evolution

This introduces a new Evolver class, which is responsible for managing
the evolution process. Previously, the logic for managing this existed
only in the evolve management command, which was hard to extend and
use in other projects.

Evolver uses a task-based system, where evolution-related tasks are
first queued up and then, when the caller is ready, either executed or
used for information gathering purposes (such as evolution hinting).
Callers can queue up general project-wide evolutions/purges or can queue
up the evolutions or purges of individual apps. They can also queue up
specialized tasks, if they have a need to create them.

Going forward, additional tasks may be created to help with creating
model baselines, call into Django's migrations, or perform other
operations we may need.

The evolve command itself has been rewritten to wrap the Evolver.
This massively simplifies the code of the command, taking the logic from
years of spaghetti code to something straightforward and maintainable.

Unit tests pass on all databases.

Manually tested the various evolution operations against several
generations of Review Board schema evolutions. There may be
regressions still, but functionality appears to work as expected.

Loading...