Rollback Migration

Rollback the last applied database migration (rockhopper down)

c9s Updated
Console Demo

File contents

Rollback the last applied migration using rockhopper.

Steps

  1. If $ARGUMENTS is provided, use it as the config file path. Otherwise, find all rockhopper_*.yaml config files and ask the user which one to use.
  2. First show current status so the user sees what will be rolled back:
    rockhopper --config <config_file> status
    
  3. Confirm with the user before proceeding.
  4. Run:
    rockhopper --config <config_file> down
    
  5. Report the result.

c9s/rockhopper commit 3b5bbd92a9

Frequently asked questions

npx get-skill add c9s/rollback-migration-2