Skip to content

migrations: Update user-facing commands

Administrator requested to merge ef/expose-migration-operations into main

Created by: efritz

Pulled from #29831. This PR introduces a new set of commands for sg migration as well as the migrator instance:

(cc @caugustus-sourcegraph and @danieldides, although this shouldn't change any of the recent docs unless you were taking full advantage of the CLI surface)

  • up will apply all unapplied migrations for the current schema (same as up -target=0 or the default up command)
  • upto will take an explicit target to apply (may apply multiple migrations if necessary)
  • downto will take an explicit target to revert to (may unapply multiple migrations)
  • undo will revert the "last applied" migration (this definition will change once we allow multiple migration parents)

Discussions about this set of commands (names, behaviors, etc) are welcome!

Merge request reports

Loading