RFC 697: Declare out-of-band migrations statically in Git
Created by: efritz
See RFC 697: Multiple version upgrades.
Currently, we define out-of-band migration metadata (id, name, introduced and deprecated versions) along with in-band schema migrations. We currently have no way to look at a particular release and extract the appropriate metadata, which is required for determining which out-of-band migrations need to have finished at each release point within a multi-version upgrade.
Instead, we need to declare out-of-band migration data declaratively in a static file accessible via Git (either locally via git commands, or over the public internet via GitHub's raw git api). We use a similar technique for schema definitions to detect drift from the expected schema at a particular point-in-time (as defined within the relevant git commit/tag).
After moving the declaration into a static file, we must additionally ensure that the the production database mirrors the same metadata on startup (or at least before prior to use).