public class Liquibase extends Object implements AutoCloseable
Modifier and Type | Field and Description |
---|---|
protected Database |
database |
static String |
MSG_COULD_NOT_RELEASE_LOCK |
Constructor and Description |
---|
Liquibase(DatabaseChangeLog changeLog,
ResourceAccessor resourceAccessor,
Database database) |
Liquibase(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.
|
Modifier and Type | Method and Description |
---|---|
protected ChangeLogIterator |
buildChangeLogIterator(String tag,
DatabaseChangeLog changeLog,
Contexts contexts,
LabelExpression labelExpression) |
protected RawSQLChange |
buildRawSQLChange(String rollbackScriptContents) |
CheckSum |
calculateCheckSum(String changeSetIdentifier)
Deprecated.
Use {link
CommandScope(String) . |
CheckSum |
calculateCheckSum(String filename,
String id,
String author)
Deprecated.
Use {link
CommandScope(String) . |
void |
changeLogSync(Contexts contexts)
Deprecated.
use version with LabelExpression
|
void |
changeLogSync(Contexts contexts,
LabelExpression labelExpression) |
void |
changeLogSync(Contexts contexts,
LabelExpression labelExpression,
Writer output) |
void |
changeLogSync(String contexts) |
void |
changeLogSync(String tag,
Contexts contexts,
LabelExpression labelExpression)
Changelogsync or changelogsync to tag
|
void |
changeLogSync(String tag,
Contexts contexts,
LabelExpression labelExpression,
Writer output) |
void |
changeLogSync(String tag,
String contexts) |
void |
changeLogSync(String tag,
String contexts,
Writer output) |
void |
changeLogSync(String contexts,
Writer output) |
void |
checkLiquibaseTables(boolean updateExistingNullChecksums,
DatabaseChangeLog databaseChangeLog,
Contexts contexts,
LabelExpression labelExpression) |
void |
clearCheckSums()
Sets checksums to null so they will be repopulated next run
|
void |
close() |
protected RollbackVisitor |
createRollbackVisitor() |
protected RollbackVisitor |
createRollbackVisitor(List<ChangesetsRolledback.ChangeSet> processedChangesets) |
protected UpdateVisitor |
createUpdateVisitor() |
protected UpdateVisitor |
createUpdateVisitor(ChangeExecListener listener) |
DiffResult |
diff(Database referenceDatabase,
Database targetDatabase,
CompareControl compareControl)
Deprecated.
Use {link
CommandScope(String) to generate diff instead of this method. |
void |
dropAll()
Drops all database objects in the default schema.
|
void |
dropAll(CatalogAndSchema... schemas)
Drops all database objects in the passed schema(s).
|
protected void |
executeRollbackScript(String rollbackScript,
List<ChangeSet> changeSets,
Contexts contexts,
LabelExpression labelExpression) |
void |
forceReleaseLocks() |
void |
futureRollbackSQL(Contexts contexts,
LabelExpression labelExpression,
Writer output) |
void |
futureRollbackSQL(Integer count,
Contexts contexts,
LabelExpression labelExpression,
Writer output) |
void |
futureRollbackSQL(Integer count,
Contexts contexts,
LabelExpression labelExpression,
Writer output,
boolean checkLiquibaseTables) |
protected void |
futureRollbackSQL(Integer count,
String tag,
Contexts contexts,
LabelExpression labelExpression,
Writer output) |
protected void |
futureRollbackSQL(Integer count,
String tag,
Contexts contexts,
LabelExpression labelExpression,
Writer output,
boolean checkLiquibaseTables) |
void |
futureRollbackSQL(Integer count,
String contexts,
Writer output) |
void |
futureRollbackSQL(Integer count,
String contexts,
Writer output,
boolean checkLiquibaseTables) |
void |
futureRollbackSQL(String tag,
Contexts contexts,
LabelExpression labelExpression,
Writer output) |
void |
futureRollbackSQL(String contexts,
Writer output) |
void |
futureRollbackSQL(String contexts,
Writer output,
boolean checkLiquibaseTables) |
void |
futureRollbackSQL(Writer output) |
void |
generateChangeLog(CatalogAndSchema catalogAndSchema,
DiffToChangeLog changeLogWriter,
PrintStream outputStream,
ChangeLogSerializer changeLogSerializer,
Class<? extends DatabaseObject>... snapshotTypes)
Deprecated.
Use {link
CommandScope(String) to generateChangelog instead of this method. |
void |
generateChangeLog(CatalogAndSchema catalogAndSchema,
DiffToChangeLog changeLogWriter,
PrintStream outputStream,
Class<? extends DatabaseObject>... snapshotTypes)
Deprecated.
Use {link
CommandScope(String) to generateChangelog instead of this method. |
void |
generateDocumentation(String outputDirectory) |
void |
generateDocumentation(String outputDirectory,
Contexts contexts,
LabelExpression labelExpression,
CatalogAndSchema... schemaList) |
void |
generateDocumentation(String outputDirectory,
String contexts) |
void |
generateDocumentation(String outputDirectory,
String contexts,
CatalogAndSchema... schemaList) |
String |
getChangeLogFile()
Return the change log file used by this Liquibase instance.
|
ChangeLogParameters |
getChangeLogParameters()
Returns the ChangeLogParameters container used by this Liquibase instance.
|
List<ChangeSetStatus> |
getChangeSetStatuses(Contexts contexts)
Deprecated.
use version with LabelExpression
|
List<ChangeSetStatus> |
getChangeSetStatuses(Contexts contexts,
LabelExpression labelExpression) |
List<ChangeSetStatus> |
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.
|
Connection |
getConnection(DatabaseChangeLog changeLog)
Create or retrieve the Connection object
|
Database |
getDatabase()
Returns the Database used by this Liquibase instance.
|
DatabaseChangeLog |
getDatabaseChangeLog() |
DefaultChangeExecListener |
getDefaultChangeExecListener() |
UUID |
getHubConnectionId() |
Logger |
getLog()
Return the log used by this Liquibase instance.
|
ResourceAccessor |
getResourceAccessor()
Return ResourceAccessor used by this Liquibase instance.
|
protected ChangeLogIterator |
getStandardChangelogIterator(Contexts contexts,
LabelExpression labelExpression,
boolean collectAllReasons,
DatabaseChangeLog changeLog)
Return a ChangeLogIterator constructed with standard filters
|
protected ChangeLogIterator |
getStandardChangelogIterator(Contexts contexts,
LabelExpression labelExpression,
DatabaseChangeLog changeLog) |
boolean |
isSafeToRunUpdate()
Returns true if it is "save" to migrate the database.
|
protected boolean |
isUpToDateFastCheck(Contexts contexts,
LabelExpression labelExpression)
Performs check of the historyService to determine if there is no unrun changesets without obtaining an exclusive write lock.
|
DatabaseChangeLogLock[] |
listLocks()
Display change log lock information.
|
Collection<RanChangeSet> |
listUnexpectedChangeSets(Contexts contexts,
LabelExpression labelExpression) |
Collection<RanChangeSet> |
listUnexpectedChangeSets(String contexts) |
List<ChangeSet> |
listUnrunChangeSets(Contexts contexts)
Deprecated.
use version with LabelExpression
|
List<ChangeSet> |
listUnrunChangeSets(Contexts contexts,
LabelExpression labels) |
List<ChangeSet> |
listUnrunChangeSets(Contexts contexts,
LabelExpression labels,
boolean checkLiquibaseTables) |
void |
markNextChangeSetRan(Contexts contexts,
LabelExpression labelExpression) |
void |
markNextChangeSetRan(Contexts contexts,
LabelExpression labelExpression,
Writer output) |
void |
markNextChangeSetRan(String contexts) |
void |
markNextChangeSetRan(String contexts,
Writer output) |
void |
outputHeader(String message) |
protected void |
removeRunStatus(List<ChangeSet> changeSets,
Contexts contexts,
LabelExpression labelExpression) |
void |
reportLocks(PrintStream out) |
void |
reportStatus(boolean verbose,
Contexts contexts,
LabelExpression labels,
Writer out) |
void |
reportStatus(boolean verbose,
Contexts contexts,
Writer out) |
void |
reportStatus(boolean verbose,
String contexts,
Writer out) |
void |
reportUnexpectedChangeSets(boolean verbose,
Contexts contexts,
LabelExpression labelExpression,
Writer out) |
void |
reportUnexpectedChangeSets(boolean verbose,
String contexts,
Writer out) |
protected void |
resetServices() |
void |
rollback(Date dateToRollBackTo,
Contexts contexts,
LabelExpression labelExpression) |
void |
rollback(Date dateToRollBackTo,
Contexts contexts,
LabelExpression labelExpression,
Writer output) |
void |
rollback(Date dateToRollBackTo,
String contexts) |
void |
rollback(Date dateToRollBackTo,
String rollbackScript,
Contexts contexts,
LabelExpression labelExpression)
Rollback to date
|
void |
rollback(Date dateToRollBackTo,
String rollbackScript,
Contexts contexts,
LabelExpression labelExpression,
Writer output) |
void |
rollback(Date dateToRollBackTo,
String rollbackScript,
String contexts) |
void |
rollback(Date dateToRollBackTo,
String rollbackScript,
String contexts,
Writer output) |
void |
rollback(Date dateToRollBackTo,
String contexts,
Writer output) |
void |
rollback(int changesToRollback,
Contexts contexts,
LabelExpression labelExpression) |
void |
rollback(int changesToRollback,
Contexts contexts,
LabelExpression labelExpression,
Writer output) |
void |
rollback(int changesToRollback,
Contexts contexts,
Writer output) |
void |
rollback(int changesToRollback,
String contexts) |
void |
rollback(int changesToRollback,
String rollbackScript,
Contexts contexts,
LabelExpression labelExpression)
Rollback count
|
void |
rollback(int changesToRollback,
String rollbackScript,
Contexts contexts,
LabelExpression labelExpression,
Writer output) |
void |
rollback(int changesToRollback,
String rollbackScript,
Contexts contexts,
Writer output) |
void |
rollback(int changesToRollback,
String rollbackScript,
String contexts) |
void |
rollback(int changesToRollback,
String rollbackScript,
String contexts,
Writer output) |
void |
rollback(int changesToRollback,
String contexts,
Writer output) |
void |
rollback(String tagToRollBackTo,
Contexts contexts) |
void |
rollback(String tagToRollBackTo,
Contexts contexts,
LabelExpression labelExpression) |
void |
rollback(String tagToRollBackTo,
Contexts contexts,
LabelExpression labelExpression,
Writer output) |
void |
rollback(String tagToRollBackTo,
Contexts contexts,
Writer output) |
void |
rollback(String tagToRollBackTo,
String contexts) |
void |
rollback(String tagToRollBackTo,
String rollbackScript,
Contexts contexts) |
void |
rollback(String tagToRollBackTo,
String rollbackScript,
Contexts contexts,
LabelExpression labelExpression)
Rollback to tag
|
void |
rollback(String tagToRollBackTo,
String rollbackScript,
Contexts contexts,
LabelExpression labelExpression,
Writer output) |
void |
rollback(String tagToRollBackTo,
String rollbackScript,
Contexts contexts,
Writer output) |
void |
rollback(String tagToRollBackTo,
String rollbackScript,
String contexts) |
void |
rollback(String tagToRollBackTo,
String rollbackScript,
String contexts,
Writer output) |
void |
rollback(String tagToRollBackTo,
String contexts,
Writer output) |
void |
setChangeExecListener(ChangeExecListener listener) |
void |
setChangeLogParameter(String key,
Object value) |
void |
setChangeLogSyncListener(ChangeLogSyncListener changeLogSyncListener) |
void |
setHubConnectionId(UUID hubConnectionId) |
void |
tag(String tagString)
Deprecated.
Use {link
CommandScope(String) to tag instead of this method. |
boolean |
tagExists(String tagString)
Deprecated.
Use {link
CommandScope(String) to verify tag exist instead of this method. |
void |
update()
Convenience method for
update(Contexts) that runs in "no context mode". |
void |
update(Contexts contexts)
Executes Liquibase "update" logic which ensures that the configured
Database is up to date according to
the configured changelog file. |
void |
update(Contexts contexts,
LabelExpression labelExpression)
Liquibase update
|
void |
update(Contexts contexts,
LabelExpression labelExpression,
boolean checkLiquibaseTables)
Liquibase update
|
void |
update(Contexts contexts,
LabelExpression labelExpression,
Writer output) |
void |
update(Contexts contexts,
LabelExpression labelExpression,
Writer output,
boolean checkLiquibaseTables) |
void |
update(Contexts contexts,
Writer output) |
void |
update(int changesToApply,
Contexts contexts,
LabelExpression labelExpression)
Update to count
|
void |
update(int changesToApply,
Contexts contexts,
LabelExpression labelExpression,
Writer output) |
void |
update(int changesToApply,
String contexts) |
void |
update(int changesToApply,
String contexts,
Writer output) |
void |
update(String contexts)
Convenience method for
update(Contexts) that constructs the Context object from the passed string. |
void |
update(String tag,
Contexts contexts) |
void |
update(String tag,
Contexts contexts,
LabelExpression labelExpression)
Update to tag
|
void |
update(String tag,
Contexts contexts,
LabelExpression labelExpression,
Writer output) |
void |
update(String tag,
Contexts contexts,
Writer output) |
void |
update(String tag,
String contexts) |
void |
update(String tag,
String contexts,
Writer output) |
void |
update(String contexts,
Writer output) |
void |
updateTestingRollback(Contexts contexts,
LabelExpression labelExpression) |
void |
updateTestingRollback(String contexts) |
void |
updateTestingRollback(String tag,
Contexts contexts,
LabelExpression labelExpression) |
void |
validate()
Checks changelogs for bad MD5Sums and preconditions before attempting a migration
|
public static final String MSG_COULD_NOT_RELEASE_LOCK
protected Database database
public Liquibase(String changeLogFile, ResourceAccessor resourceAccessor, DatabaseConnection conn) throws LiquibaseException
DatabaseFactory.findCorrectDatabaseImplementation(liquibase.database.DatabaseConnection)
public Liquibase(String changeLogFile, ResourceAccessor resourceAccessor, Database database)
DatabaseConnection
,
Database
,
ResourceAccessor
public Liquibase(DatabaseChangeLog changeLog, ResourceAccessor resourceAccessor, Database database)
public UUID getHubConnectionId()
public void setHubConnectionId(UUID hubConnectionId)
public String getChangeLogFile()
public Logger getLog()
public ChangeLogParameters getChangeLogParameters()
public Database getDatabase()
public ResourceAccessor getResourceAccessor()
public void update() throws LiquibaseException
update(Contexts)
that runs in "no context mode".LiquibaseException
public void update(String contexts) throws LiquibaseException
update(Contexts)
that constructs the Context object from the passed string.
To run in "no context mode", pass a null or empty "".LiquibaseException
public void update(Contexts contexts) throws LiquibaseException
Database
is up to date according to
the configured changelog file. To run in "no context mode", pass a null or empty context object.LiquibaseException
public void update(Contexts contexts, LabelExpression labelExpression) throws LiquibaseException
contexts
- labelExpression
- LiquibaseException
public void update(Contexts contexts, LabelExpression labelExpression, boolean checkLiquibaseTables) throws LiquibaseException
contexts
- labelExpression
- checkLiquibaseTables
- LiquibaseException
protected boolean isUpToDateFastCheck(Contexts contexts, LabelExpression labelExpression) throws LiquibaseException
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.
LiquibaseException
public Connection getConnection(DatabaseChangeLog changeLog) throws LiquibaseHubException
changeLog
- Database changelogLiquibaseHubException
- Thrown by HubServicepublic DatabaseChangeLog getDatabaseChangeLog() throws LiquibaseException
LiquibaseException
protected UpdateVisitor createUpdateVisitor()
protected UpdateVisitor createUpdateVisitor(ChangeExecListener listener)
protected RollbackVisitor createRollbackVisitor()
protected RollbackVisitor createRollbackVisitor(List<ChangesetsRolledback.ChangeSet> processedChangesets)
protected ChangeLogIterator getStandardChangelogIterator(Contexts contexts, LabelExpression labelExpression, DatabaseChangeLog changeLog) throws DatabaseException
DatabaseException
protected ChangeLogIterator getStandardChangelogIterator(Contexts contexts, LabelExpression labelExpression, boolean collectAllReasons, DatabaseChangeLog changeLog) throws DatabaseException
contexts
- Contexts to filter forlabelExpression
- Labels to filter forcollectAllReasons
- Flag to control whether all skip reasons are accumulated
default value is false to only gather the firstchangeLog
- The changelog to processDatabaseException
protected ChangeLogIterator buildChangeLogIterator(String tag, DatabaseChangeLog changeLog, Contexts contexts, LabelExpression labelExpression) throws DatabaseException
DatabaseException
public void update(String contexts, Writer output) throws LiquibaseException
LiquibaseException
public void update(Contexts contexts, Writer output) throws LiquibaseException
LiquibaseException
public void update(Contexts contexts, LabelExpression labelExpression, Writer output) throws LiquibaseException
LiquibaseException
public void update(Contexts contexts, LabelExpression labelExpression, Writer output, boolean checkLiquibaseTables) throws LiquibaseException
LiquibaseException
public void update(int changesToApply, String contexts) throws LiquibaseException
LiquibaseException
public void update(int changesToApply, Contexts contexts, LabelExpression labelExpression) throws LiquibaseException
changesToApply
- contexts
- labelExpression
- LiquibaseException
public void update(String tag, String contexts) throws LiquibaseException
LiquibaseException
public void update(String tag, Contexts contexts) throws LiquibaseException
LiquibaseException
public void update(String tag, Contexts contexts, LabelExpression labelExpression) throws LiquibaseException
tag
- Tag to update forcontexts
- labelExpression
- LiquibaseException
public void update(int changesToApply, String contexts, Writer output) throws LiquibaseException
LiquibaseException
public void update(int changesToApply, Contexts contexts, LabelExpression labelExpression, Writer output) throws LiquibaseException
LiquibaseException
public void update(String tag, String contexts, Writer output) throws LiquibaseException
LiquibaseException
public void update(String tag, Contexts contexts, Writer output) throws LiquibaseException
LiquibaseException
public void update(String tag, Contexts contexts, LabelExpression labelExpression, Writer output) throws LiquibaseException
LiquibaseException
public void outputHeader(String message) throws DatabaseException
DatabaseException
public void rollback(int changesToRollback, String contexts, Writer output) throws LiquibaseException
LiquibaseException
public void rollback(int changesToRollback, Contexts contexts, Writer output) throws LiquibaseException
LiquibaseException
public void rollback(int changesToRollback, Contexts contexts, LabelExpression labelExpression, Writer output) throws LiquibaseException
LiquibaseException
public void rollback(int changesToRollback, String rollbackScript, String contexts, Writer output) throws LiquibaseException
LiquibaseException
public void rollback(int changesToRollback, String rollbackScript, Contexts contexts, Writer output) throws LiquibaseException
LiquibaseException
public void rollback(int changesToRollback, String rollbackScript, Contexts contexts, LabelExpression labelExpression, Writer output) throws LiquibaseException
LiquibaseException
public void rollback(int changesToRollback, String contexts) throws LiquibaseException
LiquibaseException
public void rollback(int changesToRollback, Contexts contexts, LabelExpression labelExpression) throws LiquibaseException
LiquibaseException
public void rollback(int changesToRollback, String rollbackScript, String contexts) throws LiquibaseException
LiquibaseException
public void rollback(int changesToRollback, String rollbackScript, Contexts contexts, LabelExpression labelExpression) throws LiquibaseException
changesToRollback
- rollbackScript
- contexts
- labelExpression
- LiquibaseException
protected void removeRunStatus(List<ChangeSet> changeSets, Contexts contexts, LabelExpression labelExpression) throws LiquibaseException
LiquibaseException
protected void executeRollbackScript(String rollbackScript, List<ChangeSet> changeSets, Contexts contexts, LabelExpression labelExpression) throws LiquibaseException
LiquibaseException
protected RawSQLChange buildRawSQLChange(String rollbackScriptContents)
public void rollback(String tagToRollBackTo, String contexts, Writer output) throws LiquibaseException
LiquibaseException
public void rollback(String tagToRollBackTo, Contexts contexts, Writer output) throws LiquibaseException
LiquibaseException
public void rollback(String tagToRollBackTo, Contexts contexts, LabelExpression labelExpression, Writer output) throws LiquibaseException
LiquibaseException
public void rollback(String tagToRollBackTo, String rollbackScript, String contexts, Writer output) throws LiquibaseException
LiquibaseException
public void rollback(String tagToRollBackTo, String rollbackScript, Contexts contexts, Writer output) throws LiquibaseException
LiquibaseException
public void rollback(String tagToRollBackTo, String rollbackScript, Contexts contexts, LabelExpression labelExpression, Writer output) throws LiquibaseException
LiquibaseException
public void rollback(String tagToRollBackTo, String contexts) throws LiquibaseException
LiquibaseException
public void rollback(String tagToRollBackTo, Contexts contexts) throws LiquibaseException
LiquibaseException
public void rollback(String tagToRollBackTo, Contexts contexts, LabelExpression labelExpression) throws LiquibaseException
LiquibaseException
public void rollback(String tagToRollBackTo, String rollbackScript, String contexts) throws LiquibaseException
LiquibaseException
public void rollback(String tagToRollBackTo, String rollbackScript, Contexts contexts) throws LiquibaseException
LiquibaseException
public void rollback(String tagToRollBackTo, String rollbackScript, Contexts contexts, LabelExpression labelExpression) throws LiquibaseException
tagToRollBackTo
- rollbackScript
- contexts
- labelExpression
- LiquibaseException
public void rollback(Date dateToRollBackTo, String contexts, Writer output) throws LiquibaseException
LiquibaseException
public void rollback(Date dateToRollBackTo, String rollbackScript, String contexts, Writer output) throws LiquibaseException
LiquibaseException
public void rollback(Date dateToRollBackTo, Contexts contexts, LabelExpression labelExpression, Writer output) throws LiquibaseException
LiquibaseException
public void rollback(Date dateToRollBackTo, String rollbackScript, Contexts contexts, LabelExpression labelExpression, Writer output) throws LiquibaseException
LiquibaseException
public void rollback(Date dateToRollBackTo, String contexts) throws LiquibaseException
LiquibaseException
public void rollback(Date dateToRollBackTo, Contexts contexts, LabelExpression labelExpression) throws LiquibaseException
LiquibaseException
public void rollback(Date dateToRollBackTo, String rollbackScript, String contexts) throws LiquibaseException
LiquibaseException
public void rollback(Date dateToRollBackTo, String rollbackScript, Contexts contexts, LabelExpression labelExpression) throws LiquibaseException
dateToRollBackTo
- rollbackScript
- contexts
- labelExpression
- LiquibaseException
public void changeLogSync(String contexts, Writer output) throws LiquibaseException
LiquibaseException
public void changeLogSync(Contexts contexts, LabelExpression labelExpression, Writer output) throws LiquibaseException
LiquibaseException
public void changeLogSync(String contexts) throws LiquibaseException
LiquibaseException
@Deprecated public void changeLogSync(Contexts contexts) throws LiquibaseException
LiquibaseException
public void changeLogSync(Contexts contexts, LabelExpression labelExpression) throws LiquibaseException
LiquibaseException
public void changeLogSync(String tag, String contexts) throws LiquibaseException
LiquibaseException
public void changeLogSync(String tag, Contexts contexts, LabelExpression labelExpression) throws LiquibaseException
tag
- contexts
- labelExpression
- LiquibaseException
public void changeLogSync(String tag, String contexts, Writer output) throws LiquibaseException
LiquibaseException
public void changeLogSync(String tag, Contexts contexts, LabelExpression labelExpression, Writer output) throws LiquibaseException
LiquibaseException
public void markNextChangeSetRan(String contexts, Writer output) throws LiquibaseException
LiquibaseException
public void markNextChangeSetRan(Contexts contexts, LabelExpression labelExpression, Writer output) throws LiquibaseException
LiquibaseException
public void markNextChangeSetRan(String contexts) throws LiquibaseException
LiquibaseException
public void markNextChangeSetRan(Contexts contexts, LabelExpression labelExpression) throws LiquibaseException
LiquibaseException
public void futureRollbackSQL(String contexts, Writer output) throws LiquibaseException
LiquibaseException
public void futureRollbackSQL(Writer output) throws LiquibaseException
LiquibaseException
public void futureRollbackSQL(String contexts, Writer output, boolean checkLiquibaseTables) throws LiquibaseException
LiquibaseException
public void futureRollbackSQL(Integer count, String contexts, Writer output) throws LiquibaseException
LiquibaseException
public void futureRollbackSQL(Contexts contexts, LabelExpression labelExpression, Writer output) throws LiquibaseException
LiquibaseException
public void futureRollbackSQL(Integer count, String contexts, Writer output, boolean checkLiquibaseTables) throws LiquibaseException
LiquibaseException
public void futureRollbackSQL(Integer count, Contexts contexts, LabelExpression labelExpression, Writer output) throws LiquibaseException
LiquibaseException
public void futureRollbackSQL(Integer count, Contexts contexts, LabelExpression labelExpression, Writer output, boolean checkLiquibaseTables) throws LiquibaseException
LiquibaseException
public void futureRollbackSQL(String tag, Contexts contexts, LabelExpression labelExpression, Writer output) throws LiquibaseException
LiquibaseException
protected void futureRollbackSQL(Integer count, String tag, Contexts contexts, LabelExpression labelExpression, Writer output) throws LiquibaseException
LiquibaseException
protected void futureRollbackSQL(Integer count, String tag, Contexts contexts, LabelExpression labelExpression, Writer output, boolean checkLiquibaseTables) throws LiquibaseException
LiquibaseException
protected void resetServices()
public final void dropAll() throws DatabaseException
DatabaseException
public final void dropAll(CatalogAndSchema... schemas) throws DatabaseException
DatabaseException
@Deprecated public void tag(String tagString) throws LiquibaseException
CommandScope(String)
to tag instead of this method.LiquibaseException
@Deprecated public boolean tagExists(String tagString) throws LiquibaseException
CommandScope(String)
to verify tag exist instead of this method.LiquibaseException
public void updateTestingRollback(String contexts) throws LiquibaseException
LiquibaseException
public void updateTestingRollback(Contexts contexts, LabelExpression labelExpression) throws LiquibaseException
LiquibaseException
public void updateTestingRollback(String tag, Contexts contexts, LabelExpression labelExpression) throws LiquibaseException
LiquibaseException
public void checkLiquibaseTables(boolean updateExistingNullChecksums, DatabaseChangeLog databaseChangeLog, Contexts contexts, LabelExpression labelExpression) throws LiquibaseException
LiquibaseException
public boolean isSafeToRunUpdate() throws DatabaseException
DatabaseException
public DatabaseChangeLogLock[] listLocks() throws LiquibaseException
LiquibaseException
public void reportLocks(PrintStream out) throws LiquibaseException
LiquibaseException
public void forceReleaseLocks() throws LiquibaseException
LiquibaseException
@Deprecated public List<ChangeSet> listUnrunChangeSets(Contexts contexts) throws LiquibaseException
LiquibaseException
public List<ChangeSet> listUnrunChangeSets(Contexts contexts, LabelExpression labels) throws LiquibaseException
LiquibaseException
public List<ChangeSet> listUnrunChangeSets(Contexts contexts, LabelExpression labels, boolean checkLiquibaseTables) throws LiquibaseException
LiquibaseException
@Deprecated public List<ChangeSetStatus> getChangeSetStatuses(Contexts contexts) throws LiquibaseException
LiquibaseException
public List<ChangeSetStatus> getChangeSetStatuses(Contexts contexts, LabelExpression labelExpression) throws LiquibaseException
LiquibaseException
public List<ChangeSetStatus> getChangeSetStatuses(Contexts contexts, LabelExpression labelExpression, boolean checkLiquibaseTables) throws LiquibaseException
LiquibaseException
public void reportStatus(boolean verbose, String contexts, Writer out) throws LiquibaseException
LiquibaseException
public void reportStatus(boolean verbose, Contexts contexts, Writer out) throws LiquibaseException
LiquibaseException
public void reportStatus(boolean verbose, Contexts contexts, LabelExpression labels, Writer out) throws LiquibaseException
LiquibaseException
public Collection<RanChangeSet> listUnexpectedChangeSets(String contexts) throws LiquibaseException
LiquibaseException
public Collection<RanChangeSet> listUnexpectedChangeSets(Contexts contexts, LabelExpression labelExpression) throws LiquibaseException
LiquibaseException
public void reportUnexpectedChangeSets(boolean verbose, String contexts, Writer out) throws LiquibaseException
LiquibaseException
public void reportUnexpectedChangeSets(boolean verbose, Contexts contexts, LabelExpression labelExpression, Writer out) throws LiquibaseException
LiquibaseException
public void clearCheckSums() throws LiquibaseException
LiquibaseException
@Deprecated public final CheckSum calculateCheckSum(String changeSetIdentifier) throws LiquibaseException
CommandScope(String)
.LiquibaseException
@Deprecated public CheckSum calculateCheckSum(String filename, String id, String author) throws LiquibaseException
CommandScope(String)
.LiquibaseException
public void generateDocumentation(String outputDirectory) throws LiquibaseException
LiquibaseException
public void generateDocumentation(String outputDirectory, String contexts) throws LiquibaseException
LiquibaseException
public void generateDocumentation(String outputDirectory, String contexts, CatalogAndSchema... schemaList) throws LiquibaseException
LiquibaseException
public void generateDocumentation(String outputDirectory, Contexts contexts, LabelExpression labelExpression, CatalogAndSchema... schemaList) throws LiquibaseException
LiquibaseException
@Deprecated public DiffResult diff(Database referenceDatabase, Database targetDatabase, CompareControl compareControl) throws LiquibaseException
CommandScope(String)
to generate diff instead of this method.LiquibaseException
public void validate() throws LiquibaseException
LiquibaseException
public void setChangeExecListener(ChangeExecListener listener)
public void setChangeLogSyncListener(ChangeLogSyncListener changeLogSyncListener)
public DefaultChangeExecListener getDefaultChangeExecListener()
@Deprecated @SafeVarargs public final void generateChangeLog(CatalogAndSchema catalogAndSchema, DiffToChangeLog changeLogWriter, PrintStream outputStream, Class<? extends DatabaseObject>... snapshotTypes) throws DatabaseException, IOException, ParserConfigurationException, CommandExecutionException
CommandScope(String)
to generateChangelog instead of this method.@Deprecated @SafeVarargs public final void generateChangeLog(CatalogAndSchema catalogAndSchema, DiffToChangeLog changeLogWriter, PrintStream outputStream, ChangeLogSerializer changeLogSerializer, Class<? extends DatabaseObject>... snapshotTypes) throws DatabaseException, IOException, ParserConfigurationException, CommandExecutionException
CommandScope(String)
to generateChangelog instead of this method.public void close() throws LiquibaseException
close
in interface AutoCloseable
LiquibaseException
Copyright © 2023 Liquibase.org. All rights reserved.