Package liquibase
Class Liquibase
java.lang.Object
liquibase.Liquibase
- All Implemented Interfaces:
AutoCloseable
Primary facade class for interacting with Liquibase.
The built in command line, Ant, Maven and other ways of running Liquibase are wrappers around methods in this class.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionLiquibase(String changeLogFile, ResourceAccessor resourceAccessor, Database database) Creates a Liquibase instance.Liquibase(String changeLogFile, ResourceAccessor resourceAccessor, DatabaseConnection conn) Creates a Liquibase instance for a given DatabaseConnection.Liquibase(DatabaseChangeLog changeLog, ResourceAccessor resourceAccessor, Database database) -
Method Summary
Modifier and TypeMethodDescriptionfinal CheckSumcalculateCheckSum(String changeSetIdentifier) Deprecated.calculateCheckSum(String changeSetPath, String changeSetId, String changeSetAuthor) Calculate the checksum for a given changeset specified by path, changeset id and authorvoidchangeLogSync(String contexts) voidchangeLogSync(String contexts, Writer output) voidchangeLogSync(String tag, String contexts) voidchangeLogSync(String tag, String contexts, Writer output) voidchangeLogSync(String tag, Contexts contexts, LabelExpression labelExpression) Synchronizes the changelog with the database up to a specified tag.voidchangeLogSync(String tag, Contexts contexts, LabelExpression labelExpression, Writer output) voidchangeLogSync(Contexts contexts) Deprecated.use version with LabelExpressionvoidchangeLogSync(Contexts contexts, LabelExpression labelExpression) voidchangeLogSync(Contexts contexts, LabelExpression labelExpression, Writer output) voidcheckLiquibaseTables(boolean updateExistingNullChecksums, DatabaseChangeLog databaseChangeLog, Contexts contexts, LabelExpression labelExpression) voidDeprecated.UseCommandScope(String)voidclose()diff(Database referenceDatabase, Database targetDatabase, CompareControl compareControl) Deprecated.Use {linkCommandScope(String)to generate diff instead of this method.final voiddropAll()Drops all database objects in the default schema.final voidDrops all database objects in the default schema.final voiddropAll(Boolean dropDbclhistory, CatalogAndSchema... schemas) Drops all database objects in the passed schema(s).final voiddropAll(CatalogAndSchema... schemas) Drops all database objects in the passed schema(s).voidvoidfutureRollbackSQL(Writer output) Deprecated.voidfutureRollbackSQL(Integer count, String contexts, Writer output) Deprecated.voidfutureRollbackSQL(Integer count, String contexts, Writer output, boolean checkLiquibaseTables) Deprecated.protected voidfutureRollbackSQL(Integer count, String tag, Contexts contexts, LabelExpression labelExpression, Writer output) Deprecated.protected voidfutureRollbackSQL(Integer count, String tag, Contexts contexts, LabelExpression labelExpression, Writer output, boolean checkLiquibaseTables) Deprecated.voidfutureRollbackSQL(Integer count, Contexts contexts, LabelExpression labelExpression, Writer output) Deprecated.voidfutureRollbackSQL(Integer count, Contexts contexts, LabelExpression labelExpression, Writer output, boolean checkLiquibaseTables) Deprecated.voidfutureRollbackSQL(String contexts, Writer output) Deprecated.voidfutureRollbackSQL(String contexts, Writer output, boolean checkLiquibaseTables) Deprecated.voidfutureRollbackSQL(String tag, Contexts contexts, LabelExpression labelExpression, Writer output) Deprecated.voidfutureRollbackSQL(Contexts contexts, LabelExpression labelExpression, Writer output) Deprecated.final voidgenerateChangeLog(CatalogAndSchema catalogAndSchema, DiffToChangeLog changeLogWriter, PrintStream outputStream, Class<? extends DatabaseObject>... snapshotTypes) Deprecated.Use {linkCommandScope(String)to generateChangelog instead of this method.final voidgenerateChangeLog(CatalogAndSchema catalogAndSchema, DiffToChangeLog changeLogWriter, PrintStream outputStream, ChangeLogSerializer changeLogSerializer, Class<? extends DatabaseObject>... snapshotTypes) Deprecated.Use {linkCommandScope(String)to generateChangelog instead of this method.voidgenerateDocumentation(String outputDirectory) Deprecated.voidgenerateDocumentation(String outputDirectory, String contexts) Deprecated.voidgenerateDocumentation(String outputDirectory, String contexts, CatalogAndSchema... schemaList) Deprecated.voidgenerateDocumentation(String outputDirectory, Contexts contexts, LabelExpression labelExpression, CatalogAndSchema... schemaList) Deprecated.UseCommandScopeto generate dbDoc instead of this method.Return the change log file used by this Liquibase instance.Returns the ChangeLogParameters container used by this Liquibase instance.getChangeSetStatuses(Contexts contexts) Deprecated.use version with LabelExpressiongetChangeSetStatuses(Contexts contexts, LabelExpression labelExpression) getChangeSetStatuses(Contexts contexts, LabelExpression labelExpression, boolean checkLiquibaseTables) Returns the ChangeSetStatuses of all changesets in the change log file and history in the order they would be ran.Returns the Database used by this Liquibase instance.getLog()Return the log used by this Liquibase instance.Return ResourceAccessor used by this Liquibase instance.protected ChangeLogIteratorgetStandardChangelogIterator(Contexts contexts, LabelExpression labelExpression, DatabaseChangeLog changeLog) Return a ChangeLogIterator constructed with standard filters for processing the specified changelog.booleanReturns true if it is "save" to migrate the database.protected booleanisUpToDateFastCheck(Contexts contexts, LabelExpression labelExpression) Deprecated.this method has been moved toAbstractUpdateCommandStep, use that one instead.Deprecated.listUnexpectedChangeSets(String contexts) Deprecated.listUnexpectedChangeSets(Contexts contexts, LabelExpression labelExpression) Deprecated.listUnrunChangeSets(Contexts contexts) Deprecated.use version with LabelExpressionlistUnrunChangeSets(Contexts contexts, LabelExpression labels) Deprecated.listUnrunChangeSets(Contexts contexts, LabelExpression labels, boolean checkLiquibaseTables) Deprecated.voidmarkNextChangeSetRan(String contexts) Deprecated.voidmarkNextChangeSetRan(String contexts, Writer output) Deprecated.voidmarkNextChangeSetRan(Contexts contexts, LabelExpression labelExpression) Deprecated.voidmarkNextChangeSetRan(Contexts contexts, LabelExpression labelExpression, Writer output) Deprecated.voidoutputHeader(String message) Deprecated.use {@link LoggingExecutorTextUtil#outputHeader(String, Database, String))}voidreportLocks(PrintStream out) Deprecated.voidreportStatus(boolean verbose, String contexts, Writer out) Deprecated.voidreportStatus(boolean verbose, Contexts contexts, Writer out) Deprecated.voidreportStatus(boolean verbose, Contexts contexts, LabelExpression labels, Writer out) Deprecated.voidreportUnexpectedChangeSets(boolean verbose, String contexts, Writer out) Deprecated.voidreportUnexpectedChangeSets(boolean verbose, Contexts contexts, LabelExpression labelExpression, Writer out) Deprecated.protected voidvoidvoidvoidvoidvoidvoidrollback(int changesToRollback, String rollbackScript, Contexts contexts, LabelExpression labelExpression) Rolls back a specified number of changesets.voidrollback(int changesToRollback, String rollbackScript, Contexts contexts, LabelExpression labelExpression, Writer output) voidvoidrollback(int changesToRollback, Contexts contexts, LabelExpression labelExpression) voidrollback(int changesToRollback, Contexts contexts, LabelExpression labelExpression, Writer output) voidDeprecated.voidDeprecated.voidDeprecated.voidDeprecated.voidDeprecated.voidDeprecated.voidrollback(String tagToRollBackTo, String rollbackScript, Contexts contexts, LabelExpression labelExpression) Rolls back the database to a specific tag, using either a generated or user-defined rollback script.voidrollback(String tagToRollBackTo, String rollbackScript, Contexts contexts, LabelExpression labelExpression, Writer output) Deprecated.voidDeprecated.voidDeprecated.voidrollback(String tagToRollBackTo, Contexts contexts, LabelExpression labelExpression) Deprecated.voidrollback(String tagToRollBackTo, Contexts contexts, LabelExpression labelExpression, Writer output) Deprecated.voidvoidvoidvoidvoidrollback(Date dateToRollBackTo, String rollbackScript, Contexts contexts, LabelExpression labelExpression) Rolls back all changesets that were applied after the specified date.voidrollback(Date dateToRollBackTo, String rollbackScript, Contexts contexts, LabelExpression labelExpression, Writer output) voidrollback(Date dateToRollBackTo, Contexts contexts, LabelExpression labelExpression) voidrollback(Date dateToRollBackTo, Contexts contexts, LabelExpression labelExpression, Writer output) voidsetChangeExecListener(ChangeExecListener listener) voidsetChangeLogParameter(String key, Object value) voidsetShowSummary(UpdateSummaryEnum showSummary) voidsetShowSummaryOutput(UpdateSummaryOutputEnum showSummaryOutput) voidDeprecated.UseCommandScope(String)to tag instead of this method.booleanDeprecated.Use {linkCommandScope(String)to verify tag exist instead of this method.voidupdate()Deprecated.useCommandScopevoidDeprecated.voidDeprecated.voidupdate(int changesToApply, Contexts contexts, LabelExpression labelExpression) Deprecated.voidupdate(int changesToApply, Contexts contexts, LabelExpression labelExpression, Writer output) Deprecated.voidDeprecated.useCommandScopevoidDeprecated.voidDeprecated.voidDeprecated.voidDeprecated.voidDeprecated.voidupdate(String tag, Contexts contexts, LabelExpression labelExpression) Deprecated.voidupdate(String tag, Contexts contexts, LabelExpression labelExpression, Writer output) Deprecated.voidDeprecated.useCommandScopevoidDeprecated.voidupdate(Contexts contexts, LabelExpression labelExpression) Deprecated.useCommandScopevoidupdate(Contexts contexts, LabelExpression labelExpression, boolean checkLiquibaseTables) Deprecated.useCommandScopevoidupdate(Contexts contexts, LabelExpression labelExpression, Writer output) Deprecated.voidupdate(Contexts contexts, LabelExpression labelExpression, Writer output, boolean checkLiquibaseTables) Deprecated.voidupdateTestingRollback(String contexts) Deprecated.voidupdateTestingRollback(String tag, Contexts contexts, LabelExpression labelExpression) Deprecated.voidupdateTestingRollback(Contexts contexts, LabelExpression labelExpression) Deprecated.voidvalidate()Deprecated.useCommandScope
-
Field Details
-
MSG_COULD_NOT_RELEASE_LOCK
-
database
-
-
Constructor Details
-
Liquibase
public Liquibase(String changeLogFile, ResourceAccessor resourceAccessor, DatabaseConnection conn) throws LiquibaseException Creates a Liquibase instance for a given DatabaseConnection. The Database instance used will be found withDatabaseFactory.findCorrectDatabaseImplementation(liquibase.database.DatabaseConnection) -
Liquibase
Creates a Liquibase instance. The changeLogFile parameter must be a path that can be resolved by the passed ResourceAccessor. If windows style path separators are used for the changeLogFile, they will be standardized to unix style for better cross-system compatibility.- See Also:
-
Liquibase
-
-
Method Details
-
getChangeLogFile
Return the change log file used by this Liquibase instance. -
getLog
Return the log used by this Liquibase instance. -
getChangeLogParameters
Returns the ChangeLogParameters container used by this Liquibase instance. -
getDatabase
Returns the Database used by this Liquibase instance. -
getResourceAccessor
Return ResourceAccessor used by this Liquibase instance. -
update
Deprecated.useCommandScope- Throws:
LiquibaseException
-
update
Deprecated.useCommandScope- Throws:
LiquibaseException
-
update
Deprecated.useCommandScope- Throws:
LiquibaseException
-
update
@Deprecated public void update(Contexts contexts, LabelExpression labelExpression) throws LiquibaseException Deprecated.useCommandScope- Throws:
LiquibaseException
-
update
@Deprecated public void update(Contexts contexts, LabelExpression labelExpression, boolean checkLiquibaseTables) throws LiquibaseException Deprecated.useCommandScope- Throws:
LiquibaseException
-
isUpToDateFastCheck
@Deprecated protected boolean isUpToDateFastCheck(Contexts contexts, LabelExpression labelExpression) throws LiquibaseException Deprecated.this method has been moved toAbstractUpdateCommandStep, use that one instead.Performs check of the historyService to determine if there is no unrun changesets without obtaining an exclusive write lock. This allows multiple peer services to boot in parallel in the common case where there are no changelogs to run.If we see that there is nothing in the changelog to run and this returns true, then regardless of the lock status we already know we are "done" and can finish up without waiting for the lock.
But, if there are changelogs that might have to be ran and this returns false, you MUST get a lock and do a real check to know what changesets actually need to run.
NOTE: to reduce the number of queries to the databasehistory table, this method will cache the "fast check" results within this instance under the assumption that the total changesets will not change within this instance.
- Throws:
LiquibaseException
-
getDatabaseChangeLog
- Throws:
LiquibaseException
-
getStandardChangelogIterator
protected ChangeLogIterator getStandardChangelogIterator(Contexts contexts, LabelExpression labelExpression, DatabaseChangeLog changeLog) throws DatabaseException Return a ChangeLogIterator constructed with standard filters for processing the specified changelog.- Parameters:
contexts- The contexts to filter for.labelExpression- The labels to filter for.changeLog- The changelog to process.- Returns:
- a ChangeLogIterator instance.
- Throws:
DatabaseException- if there is an error with the database.
-
update
Deprecated.- Throws:
LiquibaseException
-
update
Deprecated.- Throws:
LiquibaseException
-
update
@Deprecated public void update(Contexts contexts, LabelExpression labelExpression, Writer output) throws LiquibaseException Deprecated.- Throws:
LiquibaseException
-
update
@Deprecated public void update(Contexts contexts, LabelExpression labelExpression, Writer output, boolean checkLiquibaseTables) throws LiquibaseException Deprecated.- Throws:
LiquibaseException
-
update
Deprecated.- Throws:
LiquibaseException
-
update
@Deprecated public void update(int changesToApply, Contexts contexts, LabelExpression labelExpression) throws LiquibaseException Deprecated.Updates the database schema with the specified number of changesets, within the given contexts and matching the given label expression.- Parameters:
changesToApply- the number of changesets to apply.contexts- the contexts in which the changesets should be applied.labelExpression- the label expression used to filter the changesets.- Throws:
LiquibaseException- if there is an error while updating the schema.
-
update
Deprecated.- Throws:
LiquibaseException
-
update
Deprecated.- Throws:
LiquibaseException
-
update
@Deprecated public void update(String tag, Contexts contexts, LabelExpression labelExpression) throws LiquibaseException Deprecated.Updates the database to a specified tag.- Parameters:
tag- The tag to update the database to.contexts- The contexts to execute in.labelExpression- The label expression to execute with.- Throws:
LiquibaseException- if there is an error updating the database.
-
update
@Deprecated public void update(int changesToApply, String contexts, Writer output) throws LiquibaseException Deprecated.- Throws:
LiquibaseException
-
update
@Deprecated public void update(int changesToApply, Contexts contexts, LabelExpression labelExpression, Writer output) throws LiquibaseException Deprecated.- Throws:
LiquibaseException
-
update
@Deprecated public void update(String tag, String contexts, Writer output) throws LiquibaseException Deprecated.- Throws:
LiquibaseException
-
update
@Deprecated public void update(String tag, Contexts contexts, Writer output) throws LiquibaseException Deprecated.- Throws:
LiquibaseException
-
update
@Deprecated public void update(String tag, Contexts contexts, LabelExpression labelExpression, Writer output) throws LiquibaseException Deprecated.- Throws:
LiquibaseException
-
outputHeader
Deprecated.use {@link LoggingExecutorTextUtil#outputHeader(String, Database, String))}- Throws:
DatabaseException
-
rollback
public void rollback(int changesToRollback, String contexts, Writer output) throws LiquibaseException - Throws:
LiquibaseException
-
rollback
public void rollback(int changesToRollback, Contexts contexts, Writer output) throws LiquibaseException - Throws:
LiquibaseException
-
rollback
public void rollback(int changesToRollback, Contexts contexts, LabelExpression labelExpression, Writer output) throws LiquibaseException - Throws:
LiquibaseException
-
rollback
public void rollback(int changesToRollback, String rollbackScript, String contexts, Writer output) throws LiquibaseException - Throws:
LiquibaseException
-
rollback
public void rollback(int changesToRollback, String rollbackScript, Contexts contexts, Writer output) throws LiquibaseException - Throws:
LiquibaseException
-
rollback
public void rollback(int changesToRollback, String rollbackScript, Contexts contexts, LabelExpression labelExpression, Writer output) throws LiquibaseException - Throws:
LiquibaseException
-
rollback
- Throws:
LiquibaseException
-
rollback
public void rollback(int changesToRollback, Contexts contexts, LabelExpression labelExpression) throws LiquibaseException - Throws:
LiquibaseException
-
rollback
public void rollback(int changesToRollback, String rollbackScript, String contexts) throws LiquibaseException - Throws:
LiquibaseException
-
rollback
public void rollback(int changesToRollback, String rollbackScript, Contexts contexts, LabelExpression labelExpression) throws LiquibaseException Rolls back a specified number of changesets. The `changesToRollback` parameter specifies how many changesets to roll back, and the `rollbackScript` parameter specifies the path to a custom SQL script to use for the rollback. The `contexts` parameter specifies which contexts to include in the rollback, and the `labelExpression` parameter specifies which labels to include in the rollback.- Parameters:
changesToRollback- the number of changesets to roll backrollbackScript- the path to a custom SQL script to use for the rollback, or `null` to use Liquibase's built-in rollback functionalitycontexts- the contexts to include in the rollback, or `null` to include all contextslabelExpression- the labels to include in the rollback, or `null` to include all labels- Throws:
LiquibaseException- if an error occurs while rolling back the changesets
-
rollback
@Deprecated public void rollback(String tagToRollBackTo, String contexts, Writer output) throws LiquibaseException Deprecated.- Throws:
LiquibaseException
-
rollback
@Deprecated public void rollback(String tagToRollBackTo, Contexts contexts, Writer output) throws LiquibaseException Deprecated.- Throws:
LiquibaseException
-
rollback
@Deprecated public void rollback(String tagToRollBackTo, Contexts contexts, LabelExpression labelExpression, Writer output) throws LiquibaseException Deprecated.- Throws:
LiquibaseException
-
rollback
@Deprecated public void rollback(String tagToRollBackTo, String rollbackScript, String contexts, Writer output) throws LiquibaseException Deprecated.- Throws:
LiquibaseException
-
rollback
@Deprecated public void rollback(String tagToRollBackTo, String rollbackScript, Contexts contexts, Writer output) throws LiquibaseException Deprecated.- Throws:
LiquibaseException
-
rollback
@Deprecated public void rollback(String tagToRollBackTo, String rollbackScript, Contexts contexts, LabelExpression labelExpression, Writer output) throws LiquibaseException Deprecated.- Throws:
LiquibaseException
-
rollback
Deprecated.- Throws:
LiquibaseException
-
rollback
@Deprecated public void rollback(String tagToRollBackTo, Contexts contexts) throws LiquibaseException Deprecated.- Throws:
LiquibaseException
-
rollback
@Deprecated public void rollback(String tagToRollBackTo, Contexts contexts, LabelExpression labelExpression) throws LiquibaseException Deprecated.- Throws:
LiquibaseException
-
rollback
@Deprecated public void rollback(String tagToRollBackTo, String rollbackScript, String contexts) throws LiquibaseException Deprecated.- Throws:
LiquibaseException
-
rollback
@Deprecated public void rollback(String tagToRollBackTo, String rollbackScript, Contexts contexts) throws LiquibaseException Deprecated.- Throws:
LiquibaseException
-
rollback
public void rollback(String tagToRollBackTo, String rollbackScript, Contexts contexts, LabelExpression labelExpression) throws LiquibaseException Rolls back the database to a specific tag, using either a generated or user-defined rollback script.- Parameters:
tagToRollBackTo- the tag to which the database should be rolled back.rollbackScript- an optional path to a user-defined rollback script. If null, Liquibase will generate the rollback SQL automatically.contexts- a list of contexts to include when rolling back the database. May be null.labelExpression- a label expression to filter the change sets to rollback. May be null.- Throws:
LiquibaseException- if there is a problem rolling back the database.
-
rollback
public void rollback(Date dateToRollBackTo, String contexts, Writer output) throws LiquibaseException - Throws:
LiquibaseException
-
rollback
public void rollback(Date dateToRollBackTo, String rollbackScript, String contexts, Writer output) throws LiquibaseException - Throws:
LiquibaseException
-
rollback
public void rollback(Date dateToRollBackTo, Contexts contexts, LabelExpression labelExpression, Writer output) throws LiquibaseException - Throws:
LiquibaseException
-
rollback
public void rollback(Date dateToRollBackTo, String rollbackScript, Contexts contexts, LabelExpression labelExpression, Writer output) throws LiquibaseException - Throws:
LiquibaseException
-
rollback
- Throws:
LiquibaseException
-
rollback
public void rollback(Date dateToRollBackTo, Contexts contexts, LabelExpression labelExpression) throws LiquibaseException - Throws:
LiquibaseException
-
rollback
public void rollback(Date dateToRollBackTo, String rollbackScript, String contexts) throws LiquibaseException - Throws:
LiquibaseException
-
rollback
public void rollback(Date dateToRollBackTo, String rollbackScript, Contexts contexts, LabelExpression labelExpression) throws LiquibaseException Rolls back all changesets that were applied after the specified date. If a rollback script is provided, the changesets are rolled back in reverse order until the script is reached. Otherwise, the changesets are rolled back in reverse order until the rollback point is reached.- Parameters:
dateToRollBackTo- the date to roll back torollbackScript- the path to a SQL script to execute for the rollback (optional)contexts- the contexts to execute the rollback in (optional)labelExpression- the label expression to use for filtering change sets (optional)- Throws:
LiquibaseException- if there was an error rolling back the changes
-
changeLogSync
- Throws:
LiquibaseException
-
changeLogSync
public void changeLogSync(Contexts contexts, LabelExpression labelExpression, Writer output) throws LiquibaseException - Throws:
LiquibaseException
-
changeLogSync
- Throws:
LiquibaseException
-
changeLogSync
Deprecated.use version with LabelExpression- Throws:
LiquibaseException
-
changeLogSync
public void changeLogSync(Contexts contexts, LabelExpression labelExpression) throws LiquibaseException - Throws:
LiquibaseException
-
changeLogSync
- Throws:
LiquibaseException
-
changeLogSync
public void changeLogSync(String tag, Contexts contexts, LabelExpression labelExpression) throws LiquibaseException Synchronizes the changelog with the database up to a specified tag.- Parameters:
tag- the tag up to which the changelog should be synchronizedcontexts- the contexts to use for the synchronizationlabelExpression- the label expression to use for the synchronization- Throws:
LiquibaseException- if an error occurs during the synchronization
-
changeLogSync
- Throws:
LiquibaseException
-
changeLogSync
public void changeLogSync(String tag, Contexts contexts, LabelExpression labelExpression, Writer output) throws LiquibaseException - Throws:
LiquibaseException
-
markNextChangeSetRan
@Deprecated public void markNextChangeSetRan(String contexts, Writer output) throws LiquibaseException Deprecated.- Throws:
LiquibaseException
-
markNextChangeSetRan
@Deprecated public void markNextChangeSetRan(Contexts contexts, LabelExpression labelExpression, Writer output) throws LiquibaseException Deprecated.- Throws:
LiquibaseException
-
markNextChangeSetRan
Deprecated.- Throws:
LiquibaseException
-
markNextChangeSetRan
@Deprecated public void markNextChangeSetRan(Contexts contexts, LabelExpression labelExpression) throws LiquibaseException Deprecated.- Throws:
LiquibaseException
-
futureRollbackSQL
Deprecated.- Throws:
LiquibaseException
-
futureRollbackSQL
Deprecated.- Throws:
LiquibaseException
-
futureRollbackSQL
@Deprecated public void futureRollbackSQL(String contexts, Writer output, boolean checkLiquibaseTables) throws LiquibaseException Deprecated.- Throws:
LiquibaseException
-
futureRollbackSQL
@Deprecated public void futureRollbackSQL(Integer count, String contexts, Writer output) throws LiquibaseException Deprecated.- Throws:
LiquibaseException
-
futureRollbackSQL
@Deprecated public void futureRollbackSQL(Contexts contexts, LabelExpression labelExpression, Writer output) throws LiquibaseException Deprecated.- Throws:
LiquibaseException
-
futureRollbackSQL
@Deprecated public void futureRollbackSQL(Integer count, String contexts, Writer output, boolean checkLiquibaseTables) throws LiquibaseException Deprecated.- Throws:
LiquibaseException
-
futureRollbackSQL
@Deprecated public void futureRollbackSQL(Integer count, Contexts contexts, LabelExpression labelExpression, Writer output) throws LiquibaseException Deprecated.- Throws:
LiquibaseException
-
futureRollbackSQL
@Deprecated public void futureRollbackSQL(Integer count, Contexts contexts, LabelExpression labelExpression, Writer output, boolean checkLiquibaseTables) throws LiquibaseException Deprecated.- Throws:
LiquibaseException
-
futureRollbackSQL
@Deprecated public void futureRollbackSQL(String tag, Contexts contexts, LabelExpression labelExpression, Writer output) throws LiquibaseException Deprecated.- Throws:
LiquibaseException
-
futureRollbackSQL
@Deprecated protected void futureRollbackSQL(Integer count, String tag, Contexts contexts, LabelExpression labelExpression, Writer output) throws LiquibaseException Deprecated.- Throws:
LiquibaseException
-
futureRollbackSQL
@Deprecated protected void futureRollbackSQL(Integer count, String tag, Contexts contexts, LabelExpression labelExpression, Writer output, boolean checkLiquibaseTables) throws LiquibaseException Deprecated.- Throws:
LiquibaseException
-
resetServices
protected void resetServices() -
dropAll
Drops all database objects in the default schema.- Throws:
DatabaseException
-
dropAll
Drops all database objects in the default schema.- Parameters:
dropDbclhistory- If true, the database changelog history table will be dropped. Requires pro license.- Throws:
DatabaseException
-
dropAll
Drops all database objects in the passed schema(s).- Throws:
DatabaseException
-
dropAll
public final void dropAll(Boolean dropDbclhistory, CatalogAndSchema... schemas) throws DatabaseException Drops all database objects in the passed schema(s).- Parameters:
dropDbclhistory- If true, the database changelog history table will be dropped. Requires pro license.- Throws:
DatabaseException
-
tag
Deprecated.UseCommandScope(String)to tag instead of this method.'Tags' the database for future rollback- Throws:
LiquibaseException
-
tagExists
Deprecated.Use {linkCommandScope(String)to verify tag exist instead of this method.Verifies if a given tag exist in the database- Throws:
LiquibaseException
-
updateTestingRollback
Deprecated.- Throws:
LiquibaseException
-
updateTestingRollback
@Deprecated public void updateTestingRollback(Contexts contexts, LabelExpression labelExpression) throws LiquibaseException Deprecated.- Throws:
LiquibaseException
-
updateTestingRollback
@Deprecated public void updateTestingRollback(String tag, Contexts contexts, LabelExpression labelExpression) throws LiquibaseException Deprecated.- Throws:
LiquibaseException
-
checkLiquibaseTables
public void checkLiquibaseTables(boolean updateExistingNullChecksums, DatabaseChangeLog databaseChangeLog, Contexts contexts, LabelExpression labelExpression) throws LiquibaseException - Throws:
LiquibaseException
-
isSafeToRunUpdate
Returns true if it is "save" to migrate the database. Currently, "safe" is defined as running in an output-sql mode or against a database on localhost. It is fine to run Liquibase against a "non-safe" database, the method is mainly used to determine if the user should be prompted before continuing.- Throws:
DatabaseException
-
listLocks
Deprecated.Display change log lock information.- Throws:
LiquibaseException
-
reportLocks
Deprecated.- Throws:
LiquibaseException
-
forceReleaseLocks
- Throws:
LiquibaseException
-
listUnrunChangeSets
Deprecated.use version with LabelExpression- Throws:
LiquibaseException
-
listUnrunChangeSets
@Deprecated public List<ChangeSet> listUnrunChangeSets(Contexts contexts, LabelExpression labels) throws LiquibaseException Deprecated.- Throws:
LiquibaseException
-
listUnrunChangeSets
@Deprecated public List<ChangeSet> listUnrunChangeSets(Contexts contexts, LabelExpression labels, boolean checkLiquibaseTables) throws LiquibaseException Deprecated.- Throws:
LiquibaseException
-
getChangeSetStatuses
@Deprecated public List<ChangeSetStatus> getChangeSetStatuses(Contexts contexts) throws LiquibaseException Deprecated.use version with LabelExpression- Throws:
LiquibaseException
-
getChangeSetStatuses
public List<ChangeSetStatus> getChangeSetStatuses(Contexts contexts, LabelExpression labelExpression) throws LiquibaseException - Throws:
LiquibaseException
-
getChangeSetStatuses
public List<ChangeSetStatus> getChangeSetStatuses(Contexts contexts, LabelExpression labelExpression, boolean checkLiquibaseTables) throws LiquibaseException Returns the ChangeSetStatuses of all changesets in the change log file and history in the order they would be ran.- Throws:
LiquibaseException
-
reportStatus
@Deprecated public void reportStatus(boolean verbose, String contexts, Writer out) throws LiquibaseException Deprecated.- Throws:
LiquibaseException
-
reportStatus
@Deprecated public void reportStatus(boolean verbose, Contexts contexts, Writer out) throws LiquibaseException Deprecated.- Throws:
LiquibaseException
-
reportStatus
@Deprecated public void reportStatus(boolean verbose, Contexts contexts, LabelExpression labels, Writer out) throws LiquibaseException Deprecated.- Throws:
LiquibaseException
-
listUnexpectedChangeSets
@Deprecated public Collection<RanChangeSet> listUnexpectedChangeSets(String contexts) throws LiquibaseException Deprecated.- Throws:
LiquibaseException
-
listUnexpectedChangeSets
@Deprecated public Collection<RanChangeSet> listUnexpectedChangeSets(Contexts contexts, LabelExpression labelExpression) throws LiquibaseException Deprecated.- Throws:
LiquibaseException
-
reportUnexpectedChangeSets
@Deprecated public void reportUnexpectedChangeSets(boolean verbose, String contexts, Writer out) throws LiquibaseException Deprecated.- Throws:
LiquibaseException
-
reportUnexpectedChangeSets
@Deprecated public void reportUnexpectedChangeSets(boolean verbose, Contexts contexts, LabelExpression labelExpression, Writer out) throws LiquibaseException Deprecated.- Throws:
LiquibaseException
-
clearCheckSums
Deprecated.UseCommandScope(String)Sets checksums to null, so they will be repopulated next run- Throws:
LiquibaseException
-
calculateCheckSum
@Deprecated public final CheckSum calculateCheckSum(String changeSetIdentifier) throws LiquibaseException Deprecated.Use {linkCommandScope(String).Calculate the checksum for a given identifier- Throws:
LiquibaseException
-
calculateCheckSum
public CheckSum calculateCheckSum(String changeSetPath, String changeSetId, String changeSetAuthor) throws LiquibaseException Calculate the checksum for a given changeset specified by path, changeset id and author- Throws:
LiquibaseException
-
generateDocumentation
Deprecated.- Throws:
LiquibaseException
-
generateDocumentation
@Deprecated public void generateDocumentation(String outputDirectory, String contexts) throws LiquibaseException Deprecated.- Throws:
LiquibaseException
-
generateDocumentation
@Deprecated public void generateDocumentation(String outputDirectory, String contexts, CatalogAndSchema... schemaList) throws LiquibaseException Deprecated.- Throws:
LiquibaseException
-
generateDocumentation
@Deprecated public void generateDocumentation(String outputDirectory, Contexts contexts, LabelExpression labelExpression, CatalogAndSchema... schemaList) throws LiquibaseException Deprecated.UseCommandScopeto generate dbDoc instead of this method.- Throws:
LiquibaseException
-
diff
@Deprecated public DiffResult diff(Database referenceDatabase, Database targetDatabase, CompareControl compareControl) throws LiquibaseException Deprecated.Use {linkCommandScope(String)to generate diff instead of this method.- Throws:
LiquibaseException
-
validate
Deprecated.useCommandScopeChecks changelogs for bad MD5Sums and preconditions before attempting a migration- Throws:
LiquibaseException
-
setChangeLogParameter
-
setChangeExecListener
-
getDefaultChangeExecListener
-
setShowSummary
-
setShowSummaryOutput
-
generateChangeLog
@Deprecated @SafeVarargs public final void generateChangeLog(CatalogAndSchema catalogAndSchema, DiffToChangeLog changeLogWriter, PrintStream outputStream, Class<? extends DatabaseObject>... snapshotTypes) throws DatabaseException, CommandExecutionException Deprecated.Use {linkCommandScope(String)to generateChangelog instead of this method. -
generateChangeLog
@Deprecated @SafeVarargs public final void generateChangeLog(CatalogAndSchema catalogAndSchema, DiffToChangeLog changeLogWriter, PrintStream outputStream, ChangeLogSerializer changeLogSerializer, Class<? extends DatabaseObject>... snapshotTypes) throws DatabaseException, CommandExecutionException Deprecated.Use {linkCommandScope(String)to generateChangelog instead of this method. -
close
- Specified by:
closein interfaceAutoCloseable- Throws:
LiquibaseException
-
CommandScope(String).