Note that there are differences in how rollback works with Maven vs. how it works from the CLI
Full name:
org.liquibase:liquibase-maven-plugin:3.8.3:rollback
Description:
Invokes Liquibase to rollback the database (and mark changesets as unapplied). The change sets to be rolled back are specified using attributes 'rollbackCount', 'rollbackTag' and/or 'rollbackDate'
Attributes:
Name | Type | Since | Description |
---|---|---|---|
liquibase.changeLogDirectory | String | - | Specifies the change log directory into which liquibase can find
the change log file. |
liquibase.changeLogFile | String | - | Specifies the change log file to use for Liquibase. |
liquibase.changelogCatalogName | String | - | Schema against which Liquibase changelog tables will be created. |
liquibase.changelogSchemaName | String | - | Schema against which Liquibase changelog tables will be created. |
liquibase.clearCheckSums | boolean | - | Flag for forcing the checksums to be cleared from the
DatabaseChangeLog table. Default value is: false. |
liquibase.contexts | String | - | The Liquibase contexts to execute, which can be "," separated if
multiple contexts are required. If no context is specified then ALL
contexts will be executed. |
liquibase.databaseChangeLogLockTableName | String | - | Table name to use for the databasechangelog. |
liquibase.databaseChangeLogTableName | String | - | Table name to use for the databasechangelog. |
liquibase.databaseClass | String | - | The class to use as the database object. |
liquibase.defaultCatalogName | String | - | The default catalog name to use the for database connection. |
liquibase.defaultSchemaName | String | - | The default schema name to use the for database connection. |
liquibase.driver | String | - | The fully qualified name of the driver class to use to connect to
the database. |
driverPropertiesFile | File | - | Location of a properties file containing JDBC connection properties
for use by the driver. |
liquibase.emptyPassword | boolean | - | Deprecated. Use an empty or null value for the password instead. Default value is: false. |
expressionVariables | Map | - | Array to put a expression variable to maven plugin. |
expressionVars | Properties | - | Array to put a expression variable to maven plugin. |
liquibase.includeArtifact | boolean | - | Allows for the maven project artifact to be included in the class
loader for obtaining the Liquibase property and DatabaseChangeLog
files. Default value is: true. |
liquibase.includeTestOutputDirectory | boolean | - | Allows for the maven test output directory to be included in the
class loader for obtaining the Liquibase property and
DatabaseChangeLog files. Default value is: true. |
liquibase.labels | String | - | The Liquibase labels to execute, which can be "," separated if
multiple labels are required or a more complex expression. If no
label is specified then ALL all will be executed. |
liquibase.liquibaseProLicenseKey | String | - | Liquibase PRO license key value |
liquibase.logging | String | - | Controls the level of logging from Liquibase when executing. The
value can be "debug", "info", "warning", "severe", or "off". The
value is case insensitive. Default value is: INFO. |
liquibase.outputDefaultCatalog | boolean | - | Whether to ignore the catalog/database name. |
liquibase.outputDefaultSchema | boolean | - | Whether to ignore the schema name. |
liquibase.outputFileEncoding | String | - | Flag to set the character encoding of the output file produced by
Liquibase during the updateSQL phase. |
liquibase.password | String | - | The database password to use to connect to the specified database. |
liquibase.promptOnNonLocalDatabase | boolean | - | Controls the prompting of users as to whether or not they really
want to run the changes on a database that is not local to the
machine that the user is current executing the plugin on. Default value is: true. |
liquibase.propertyFile | String | - | The Liquibase properties file used to configure the Liquibase
Liquibase. |
liquibase.propertyFileWillOverride | boolean | - | Flag allowing for the Liquibase properties file to override any
settings provided in the Maven plugin configuration. By default if
a property is explicity specified it is not overridden if it also
appears in the properties file. Default value is: false. |
liquibase.propertyProviderClass | String | - | The class to use as the property provider (must be a
java.util.Properties implementation). |
liquibase.rollbackCount | int | - | The number of change sets to rollback. Default value is: -1. |
liquibase.rollbackDate | String | - | The date to rollback the database to. The format of the date must
match either an ISO date format, or that of the
DateFormat.getDateInstance() for the platform the
plugin is executing on. |
liquibase.rollbackTag | String | - | The tag to roll the database back to. |
liquibase.server | String | - | The server id in settings.xml to use when authenticating with. |
liquibase.skip | boolean | - | Set this to 'true' to skip running liquibase. Its use is NOT
RECOMMENDED, but quite convenient on occasion. Default value is: false. |
systemProperties | Properties | - | List of system properties to pass to the database. |
liquibase.url | String | - | The Database URL to connect to for executing Liquibase. |
liquibase.username | String | - | The database username to use to connect to the specified database. |
liquibase.verbose | boolean | - | Controls the verbosity of the output from invoking the plugin. Default value is: false. |
liquibase.changelogCatalogName:
liquibase.changelogSchemaName:
liquibase.databaseChangeLogLockTableName:
liquibase.databaseChangeLogTableName:
liquibase.includeTestOutputDirectory:
liquibase.liquibaseProLicenseKey:
liquibase.outputDefaultCatalog:
liquibase.outputDefaultSchema:
liquibase.promptOnNonLocalDatabase:
liquibase.propertyFileWillOverride:
liquibase.propertyProviderClass:
Behavior | CLI Command | Maven |
---|---|---|
rollback by count | rollbackCount 3 | rollback goal, liquibase.rollbackCount=3 property |
rollback by tag | rollback |
rollback goal, liquibase.rollbackTag and liquibase.tag properties |
rollback to date | rollbackToDate <date/time> | rollback goal, liquibase.rollbackDate property |