migrations: Update user-facing commands
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 asup -target=0
or the defaultup
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!