Update Django Evolution and add a dependency to fix new installs.
Review Request #11262 — Created Nov. 3, 2020 and submitted
Review Board 4.0 is the first release to use a version of Django with
the built-in migrations framework, which was incompatible with
evolutions. Django Evolution 2.0 was released to orchestrate new
database installs and upgrades that incorporated both evolutions and
migrations, but it had a flaw that broke new installs on Review Board.
Basically, Django Evolution attempted to install initial migrations
first, then evolutions, and then any remaining migrations. However, the
oauth2_providerapp was a bit of a special case in that its initial
migration looks up a model that must be configured in settings by the
project to store project-specific information, and adds a
to it. They require an initial migration for the project's model with a
reverse-dependency, set to run before
Django Evolution 2.1 further works around this by allowing evolutions to
specify dependencies and reverse-dependencies at both the app and
evolution levels, and generating the correct order of dependencies based
We now depend on 2.1 for this functionality, and set the necessary
reviewboard.oauthto ensure that our model is created
oauth2_provider's migration is run, and to ensure that
reviewboard.siteis created before
model points to a
reviewboard.sitewould otherwise be
installed sometime after
oauth2_providerin a different transaction.
With this, it's now possible to install or upgrade a Review Board
database on all supported databases.
Successfully created a database on SQLite, MySQL, and Postgres.
Successfully upgraded a Review Board 3.0.19 database to 4.0 on
SQLite, MySQL, and Postgres.
Unit tests pass (aside from a couple that were already failing).