Sqitch

sqitch-rebase

Name

sqitch-rebase - Revert and redeploy database changes

Synopsis

sqitch rebase [options] [<database>]
sqitch rebase [options] [<database>] --onto-change <change>
sqitch rebase [options] [<database>] --onto-change <change> --upto-change <change>
sqitch rebase [options] [<database>] <change>
sqitch rebase [options] [<database>] <change> --upto-change <change>
sqitch rebase [options] [<database>] <change> <change>
sqitch rebase [options] [<database>] --modified
sqitch rebase [options] [<database>] --modified --upto-change <change>

Description

Revert and redeploy changes to the database. It’s effectively a shortcut for running sqitch revert and sqitch deploy in succession.

More specifically, starting from the current deployment state, changes will be reverted in reverse the order of application. All changes will be reverted unless a change is specified, either via --onto or with no option flag, in which case changes will be reverted back to that change. If nothing needs to be reverted, a message will be emitted explaining why and nothing will be reverted.

Once the revert finishes, changes will be deployed starting from the deployed state through the rest of the deployment plan. They will run to the latest change in the plan, unless a change is specified, either via --upto or with no option flag, in which case changes will be deployed up-to and including that change.

If the database has not been deployed to, or its state already matches the specified change, no reverts will be run. And if, at that point, the database is up-to-date, no deploys will be run.

The <database> parameter specifies the database to which to connect, and may also be specified as the --target option. It can be target name, a URI, an engine name, or plan file path.

Options

Configuration Variables

Sqitch

Part of the sqitch suite.