Down

Revert the last N applied migrations.

Syntax

$ vela migrate down [number]
$ vela migrate down       # revert the last one
$ vela migrate down 3     # revert the last three
$ vela migrate down --yes # no question, for scripts

The command asks for confirmation before reverting anything, and lists the migrations it reverted when it is done. With nothing to revert it says so.

Options

  • -y, --yes - Skip the confirmation prompt. Off a terminal the command refuses to run without it

The number defaults to 1 and must be a positive integer. Reverting runs each migration’s down handler, so a migration with no down handler cannot be reverted.

vela migrate rollback is an alias for this command. It reverts migrations — to put a previous release back on a server, see vela rollback.

Follow with vela sync to regenerate types, and vela migrate up to reapply when ready.