mix recall.rollback (Recall v0.1.0)

Copy Markdown View Source

Reverts applied migrations for the given Recall-backed repository.

The Recall counterpart to mix ecto.rollback (see Mix.Tasks.Recall.Migrate for why a dedicated task exists). Like ecto.rollback, it rolls back a single migration by default; pass --all, --step, or --to to roll back more.

mix recall.rollback             # rolls back the last migration
mix recall.rollback --step 3
mix recall.rollback -r MyApp.Repo --to 20240101000000

Options

  • -r, --repo — the repo to roll back
  • --all — roll back all applied migrations
  • --step — roll back N migrations (default 1)
  • --to — roll back down to and including a target version
  • --migrations-path — a migrations directory (may be given more than once)
  • --log-level — the Logger level for migration logs (default info)