Skip to content

migrations: Enrich migration operation direction

Administrator requested to merge ef/migration-operation-type into main

Created by: efritz

Pulled from #29831. This PR replaces the boolean Up field on migration operations with an enum type that will (eventually) support four operations:

  • (targeted) up: apply everything necessary to get your database up to this version
  • (targeted) down: unapply everything necessary to revert your database to this version
  • upgrade: apply everything necessary to get your database up to the latest version
  • revert: unapply whatever the tip version of your database is (undo for local development)

This PR only adds the infra for the last two; we still only expose "up" and "down" in the migrator/sg migration command. A subsequent PR will add the next two commands.

Merge request reports

Loading