public class LiquibaseRollback extends AbstractLiquibaseChangeLogMojo
Invokes Liquibase to rollback the database (and mark changesets as unapplied). The changesets to be rolled back are specified using attributes 'rollbackCount', 'rollbackTag' and/or 'rollbackDate'
Modifier and Type | Class and Description |
---|---|
protected static class |
LiquibaseRollback.RollbackType |
Modifier and Type | Field and Description |
---|---|
protected int |
rollbackCount
The number of changesets to rollback.
|
protected String |
rollbackDate
The date to rollback the database to.
|
protected String |
rollbackScript
External script containing rollback logic.
|
protected String |
rollbackTag
The tag to roll the database back to.
|
protected LiquibaseRollback.RollbackType |
type
The type of the rollback that is being performed.
|
changeLogDirectory, changeLogFile, contexts, duplicateFileMode, hubApiKey, hubMode, hubUrl, labelFilter, labels
changeExecListenerClass, changeExecListenerPropertiesFile, changelogCatalogName, changelogSchemaName, clearCheckSums, commandName, databaseChangeLogLockTableName, databaseChangeLogTableName, databaseClass, defaultCatalogName, defaultChangeExecListener, defaultSchemaName, driver, emptyPassword, includeArtifact, includeTestOutputDirectory, logging, outputDefaultCatalog, outputDefaultSchema, outputFileEncoding, password, preserveSchemaCase, project, promptOnNonLocalDatabase, propertyFile, propertyFileWillOverride, propertyProviderClass, psqlArgs, psqlExecutorName, psqlKeepTemp, psqlKeepTempName, psqlKeepTempPath, psqlLogFile, psqlPath, psqlTimeout, searchPath, showBanner, skip, sqlcmdArgs, sqlcmdCatalogName, sqlcmdExecutorName, sqlcmdKeepTemp, sqlcmdKeepTempName, sqlcmdKeepTempOverwrite, sqlcmdKeepTempPath, sqlcmdLogFile, sqlcmdPath, sqlcmdTimeout, sqlPlusArgs, sqlPlusExecutorName, sqlPlusKeepTemp, sqlPlusKeepTempName, sqlPlusKeepTempOverwrite, sqlPlusKeepTempPath, sqlPlusLogFile, sqlPlusPath, sqlPlusTimeout, systemProperties, url, username, verbose, wagonManager
Constructor and Description |
---|
LiquibaseRollback() |
Modifier and Type | Method and Description |
---|---|
protected void |
checkRequiredParametersAreSpecified()
Performs some validation after the properties file has been loaded checking that all
properties required have been specified.
|
protected void |
checkRequiredRollbackParameters() |
protected Date |
parseDate(String date) |
protected void |
performLiquibaseTask(Liquibase liquibase)
Performs the actual Liquibase task on the database using the fully configured
Liquibase . |
protected void |
printSettings(String indent)
Prints the settings that have been set of defaulted for the plugin.
|
createLiquibase, getLabelFilter, getResourceAccessor
cleanup, configureChangeLogProperties, configureFieldsAndValues, databaseConnectionRequired, execute, getClassLoaderIncludingProjectClasspath, getField, getLicenseKey, getLiquibase, getMavenArtifactClassLoader, getOutputWriter, isPromptOnNonLocalDatabase, parsePropertiesFile, setupBindInfoPackage
protected String rollbackTag
protected int rollbackCount
protected String rollbackDate
DateFormat.getDateInstance()
for the platform the plugin is executing
on.protected LiquibaseRollback.RollbackType type
protected String rollbackScript
protected void checkRequiredParametersAreSpecified() throws org.apache.maven.plugin.MojoFailureException
AbstractLiquibaseMojo
checkRequiredParametersAreSpecified
in class AbstractLiquibaseChangeLogMojo
org.apache.maven.plugin.MojoFailureException
- If any property that is required has not been
specified.protected void checkRequiredRollbackParameters() throws org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoFailureException
protected void printSettings(String indent)
AbstractLiquibaseMojo
printSettings
in class AbstractLiquibaseChangeLogMojo
indent
- The indent string to use when printing the settings.protected void performLiquibaseTask(Liquibase liquibase) throws LiquibaseException
AbstractLiquibaseChangeLogMojo
Liquibase
.performLiquibaseTask
in class AbstractLiquibaseChangeLogMojo
liquibase
- The Liquibase
that has been fully
configured to run the desired database task.LiquibaseException
protected Date parseDate(String date) throws ParseException
ParseException
Copyright © 2023 Liquibase.org. All rights reserved.