rollbackOneChangeSetSQL command is a helper command that allows you to inspect the SQL Liquibase will run to revert the changeset specified in the rollbackOneChangeSet command. It is only available for Liquibase Pro users.
rollbackOneChangeSetSQL command is typically used when you want inspect the raw SQL that Liquibase uses to revert your changeset when you run the
rollbackOneChangeSet command, so that you don't unintentionally make a mistake.
Before running the
rollbackOneChangeSetSQL command, gather the following information from your DATABASECHANGELOG table or by running the history command:
- The Author of the changeset you want to revert
- The changeset ID of the changeset you want to revert
- The file name (changeset path) of the changeset you want to revert
Then run the
rollbackOneChangeSetSQL command, with your information:
For more command specific help, type
liquibase rollbackonechangesetSQL --help into the command prompt.
rollbackOneChangeSetSQL global parameters
||The root changelog||Required|
||The JDBC database connection URL||Required|
||The database username||Required|
||The database password||Required|
||Your Liquibase Pro license key||Required|
||The path to the file where the Rollback SQL will be written||Optional *|
* If not specified, Rollback SQL output goes to
rollbackOneChangeSetSQL command parameters
||The changeset ID from the changelog.||Required|
||The name of the author for the changeset.||Required|
||The path to the changelog containing the changeset you want to roll back.||Required|
||The path to the script to use to perform the rollback.||Optional **|
** This option is only needed if the rollback is not already defined in the changelog, and if it is not a rollback that is automatically provided by Liquibase.
When successful, the
rollbackOneChangeSetSQL command produces the following output: