engineer rollback [options]

Roll back active migrations.


Options

-t, --to <file>
Roll back all migrations after, but not including the specified file (optional)
-o, --only <file>
Roll back only the specified migration file, ignoring all other active migrations (optional)
-s, --step <number>
Roll back migrations in order, but stop rolling back after the maximum number of migrations (optional)
-f, --force
Roll back, even if migrations have already been rolled back (optional)

The rollback command retracts active migrations. Migrations are rolled back in reverse chronological order (newest to oldest), based on their timestamp file names.

Examples

# Roll back all active migrations
engineer rollback

# Roll back to a specific migration
engineer rollback -t 2017102612010101-update-fields

# Roll back a specific migration
engineer rollback -o 2017102612010101-update-fields

# Roll back the last migration
engineer rollback -s 1

# Roll back a specific migration in force mode (roll it back again)
engineer rollback -o 2017102612010101-update-fields -f

About Migrations

Migrations include both up (deployment) and down (retraction) methods. The rollback command executes only the down method of each active migration. Learn more about migrations in the Migrations API documentation.