Package io.quarkus.liquibase
Class LiquibaseContext
java.lang.Object
liquibase.Liquibase
io.quarkus.liquibase.LiquibaseContext
- All Implemented Interfaces:
AutoCloseable
The quarkus liquibase context
-
Field Summary
Fields inherited from class liquibase.Liquibase
database, MSG_COULD_NOT_RELEASE_LOCK -
Constructor Summary
ConstructorsConstructorDescriptionLiquibaseContext(LiquibaseConfig config, liquibase.resource.ResourceAccessor resourceAccessor, liquibase.database.Database database) The default constructor -
Method Summary
Modifier and TypeMethodDescriptionvoidImplementation of theLiquibase.changeLogSync(Contexts, LabelExpression)method.voidchangeLogSync(Writer output) Implementation of theLiquibase.changeLogSync(Contexts, LabelExpression, Writer)method.voidcheckLiquibaseTables(boolean updateExistingNullChecksums, liquibase.changelog.DatabaseChangeLog databaseChangeLog) Implementation of theLiquibase.checkLiquibaseTables(boolean, DatabaseChangeLog, Contexts, LabelExpression)method.voidclose()Close the database connection for the liquibase instance.liquibase.ContextsCreates the default contexts base on the configurationliquibase.LabelExpressionCreates the default labels base on the configurationvoidfutureRollbackSQL(Integer count, Writer output, boolean checkLiquibaseTables) Implementation of theLiquibase.futureRollbackSQL(Integer, Contexts, LabelExpression, Writer, boolean)method.voidfutureRollbackSQL(String tag, Writer output) Implementation of theLiquibase.futureRollbackSQL(String, Contexts, LabelExpression, Writer)method.Gets the change log file pathList<liquibase.changelog.ChangeSetStatus> Implementation of theLiquibase.getChangeSetStatuses(Contexts, LabelExpression, boolean)methodGets the liquibase configurationCollection<liquibase.changelog.RanChangeSet> Implementation of theLiquibase.listUnexpectedChangeSets(Contexts, LabelExpression)method.List<liquibase.changelog.ChangeSet> Implementation of theLiquibase.listUnrunChangeSets(Contexts, LabelExpression, boolean)methodvoidImplementation of theLiquibase.markNextChangeSetRan(Contexts, LabelExpression)method.voidmarkNextChangeSetRan(Writer output) Implementation of theLiquibase.markNextChangeSetRan(Contexts, LabelExpression, Writer)method.voidreportStatus(boolean verbose, Writer output) Implementation of theLiquibase.reportStatus(boolean, Contexts, Writer)method.voidreportUnexpectedChangeSets(boolean verbose, Writer output) Implementation of theLiquibase.reportStatus(boolean, Contexts, LabelExpression, Writer)methodvoidImplementation of theLiquibase.rollback(int, String, Contexts, LabelExpression)method.voidImplementation of theLiquibase.rollback(int, String, Contexts, LabelExpression, Writer)method.voidImplementation of theLiquibase.rollback(String, String, Contexts, LabelExpression)method.voidImplementation of theLiquibase.rollback(String, String, Contexts, LabelExpression, Writer)method.voidImplementation of theLiquibase.rollback(Date, String, Contexts, LabelExpression)method.voidImplementation of theLiquibase.rollback(Date, String, Contexts, LabelExpression, Writer)method.voidrollback(Date dateToRollBackTo, String rollbackScript, liquibase.Contexts contexts, liquibase.LabelExpression labelExpression, Writer output) Implementation of theLiquibase.rollback(Date, String, Contexts, LabelExpression, Writer)method.voidupdate()Implementation of theLiquibase.update(Contexts, LabelExpression)methodvoidupdate(int changesToApply) Implementation of theLiquibase.rollback(int, String, Contexts, LabelExpression)method.voidImplementation of theLiquibase.rollback(int, String, Contexts, LabelExpression, Writer)method.voidImplementation of theLiquibase.update(String, Contexts, LabelExpression, Writer)methodvoidImplementation of theLiquibase.updateTestingRollback(String, Contexts, LabelExpression)method.Methods inherited from class liquibase.Liquibase
calculateCheckSum, calculateCheckSum, changeLogSync, changeLogSync, changeLogSync, changeLogSync, changeLogSync, changeLogSync, changeLogSync, changeLogSync, changeLogSync, checkLiquibaseTables, clearCheckSums, diff, dropAll, dropAll, dropAll, dropAll, forceReleaseLocks, futureRollbackSQL, futureRollbackSQL, futureRollbackSQL, futureRollbackSQL, futureRollbackSQL, futureRollbackSQL, futureRollbackSQL, futureRollbackSQL, futureRollbackSQL, futureRollbackSQL, generateChangeLog, generateChangeLog, generateDocumentation, generateDocumentation, generateDocumentation, generateDocumentation, getChangeLogFile, getChangeLogParameters, getChangeSetStatuses, getChangeSetStatuses, getChangeSetStatuses, getDatabase, getDatabaseChangeLog, getDefaultChangeExecListener, getLog, getResourceAccessor, getStandardChangelogIterator, isSafeToRunUpdate, isUpToDateFastCheck, listLocks, listUnexpectedChangeSets, listUnexpectedChangeSets, listUnrunChangeSets, listUnrunChangeSets, listUnrunChangeSets, markNextChangeSetRan, markNextChangeSetRan, markNextChangeSetRan, markNextChangeSetRan, outputHeader, reportLocks, reportStatus, reportStatus, reportStatus, reportUnexpectedChangeSets, reportUnexpectedChangeSets, resetServices, rollback, rollback, rollback, rollback, rollback, rollback, rollback, rollback, rollback, rollback, rollback, rollback, rollback, rollback, rollback, rollback, rollback, rollback, rollback, rollback, rollback, rollback, rollback, setChangeExecListener, setChangeLogParameter, setShowSummary, setShowSummaryOutput, tag, tagExists, update, update, update, update, update, update, update, update, update, update, update, update, update, update, update, update, update, updateTestingRollback, updateTestingRollback, updateTestingRollback, validate
-
Constructor Details
-
LiquibaseContext
public LiquibaseContext(LiquibaseConfig config, liquibase.resource.ResourceAccessor resourceAccessor, liquibase.database.Database database) The default constructor- Parameters:
config- the liquibase configurationresourceAccessor- the liquibase resource accessordatabase- the liquibase database
-
-
Method Details
-
getConfiguration
Gets the liquibase configuration- Returns:
- the liquibase configuration
-
getChangeLog
Gets the change log file path- Returns:
- the change log file path
-
createLabels
public liquibase.LabelExpression createLabels()Creates the default labels base on the configuration- Returns:
- the label expression
-
createContexts
public liquibase.Contexts createContexts()Creates the default contexts base on the configuration- Returns:
- the contexts
-
getChangeSetStatuses
public List<liquibase.changelog.ChangeSetStatus> getChangeSetStatuses() throws liquibase.exception.LiquibaseExceptionImplementation of theLiquibase.getChangeSetStatuses(Contexts, LabelExpression, boolean)method- Returns:
- the list of change set
- Throws:
liquibase.exception.LiquibaseException- if the method fails
-
update
public void update() throws liquibase.exception.LiquibaseExceptionImplementation of theLiquibase.update(Contexts, LabelExpression)method- Overrides:
updatein classliquibase.Liquibase- Throws:
liquibase.exception.LiquibaseException- if the method fails
-
listUnrunChangeSets
public List<liquibase.changelog.ChangeSet> listUnrunChangeSets() throws liquibase.exception.LiquibaseExceptionImplementation of theLiquibase.listUnrunChangeSets(Contexts, LabelExpression, boolean)method- Returns:
- the list of change set
- Throws:
liquibase.exception.LiquibaseException- if the method fails
-
update
Implementation of theLiquibase.update(String, Contexts, LabelExpression, Writer)method- Overrides:
updatein classliquibase.Liquibase- Parameters:
tag- the tagoutput- the output- Throws:
liquibase.exception.LiquibaseException- if the method fails
-
update
public void update(int changesToApply) throws liquibase.exception.LiquibaseException Implementation of theLiquibase.rollback(int, String, Contexts, LabelExpression)method.- Parameters:
changesToApply- changes to apply- Throws:
liquibase.exception.LiquibaseException- if the method fails
-
update
Implementation of theLiquibase.rollback(int, String, Contexts, LabelExpression, Writer)method.- Parameters:
changesToApply- changes to applyoutput- the output- Throws:
liquibase.exception.LiquibaseException- if the method fails
-
rollback
public void rollback(int changesToRollback, String rollbackScript, Writer output) throws liquibase.exception.LiquibaseException Implementation of theLiquibase.rollback(int, String, Contexts, LabelExpression, Writer)method.- Overrides:
rollbackin classliquibase.Liquibase- Parameters:
changesToRollback- changes to roll backrollbackScript- the rollback scriptoutput- the output- Throws:
liquibase.exception.LiquibaseException- if the method fails
-
rollback
public void rollback(int changesToRollback, String rollbackScript) throws liquibase.exception.LiquibaseException Implementation of theLiquibase.rollback(int, String, Contexts, LabelExpression)method.- Overrides:
rollbackin classliquibase.Liquibase- Parameters:
changesToRollback- changes to roll backrollbackScript- the rollback script- Throws:
liquibase.exception.LiquibaseException- if the method fails
-
rollback
public void rollback(String tagToRollBackTo, String rollbackScript, Writer output) throws liquibase.exception.LiquibaseException Implementation of theLiquibase.rollback(String, String, Contexts, LabelExpression, Writer)method.- Overrides:
rollbackin classliquibase.Liquibase- Parameters:
tagToRollBackTo- tag to roll back torollbackScript- the rollback scriptoutput- the output- Throws:
liquibase.exception.LiquibaseException- if the method fails
-
rollback
public void rollback(String tagToRollBackTo, String rollbackScript) throws liquibase.exception.LiquibaseException Implementation of theLiquibase.rollback(String, String, Contexts, LabelExpression)method.- Overrides:
rollbackin classliquibase.Liquibase- Parameters:
tagToRollBackTo- tag to roll back torollbackScript- the rollback script- Throws:
liquibase.exception.LiquibaseException- if the method fails
-
rollback
public void rollback(Date dateToRollBackTo, String rollbackScript, Writer output) throws liquibase.exception.LiquibaseException Implementation of theLiquibase.rollback(Date, String, Contexts, LabelExpression, Writer)method.- Overrides:
rollbackin classliquibase.Liquibase- Parameters:
dateToRollBackTo- date to roll back torollbackScript- the rollback scriptoutput- the output- Throws:
liquibase.exception.LiquibaseException- if the method fails
-
rollback
public void rollback(Date dateToRollBackTo, String rollbackScript, liquibase.Contexts contexts, liquibase.LabelExpression labelExpression, Writer output) throws liquibase.exception.LiquibaseException Implementation of theLiquibase.rollback(Date, String, Contexts, LabelExpression, Writer)method.- Overrides:
rollbackin classliquibase.Liquibase- Parameters:
dateToRollBackTo- date to roll back torollbackScript- the rollback scriptcontexts- the contextslabelExpression- the label expressionoutput- the output- Throws:
liquibase.exception.LiquibaseException- if the method fails
-
rollback
public void rollback(Date dateToRollBackTo, String rollbackScript) throws liquibase.exception.LiquibaseException Implementation of theLiquibase.rollback(Date, String, Contexts, LabelExpression)method.- Overrides:
rollbackin classliquibase.Liquibase- Parameters:
dateToRollBackTo- date to roll back torollbackScript- the rollback script- Throws:
liquibase.exception.LiquibaseException- if the method fails
-
changeLogSync
public void changeLogSync() throws liquibase.exception.LiquibaseExceptionImplementation of theLiquibase.changeLogSync(Contexts, LabelExpression)method.- Throws:
liquibase.exception.LiquibaseException- if the method fails
-
changeLogSync
Implementation of theLiquibase.changeLogSync(Contexts, LabelExpression, Writer)method.- Parameters:
output- the output- Throws:
liquibase.exception.LiquibaseException- if the method fails
-
markNextChangeSetRan
Implementation of theLiquibase.markNextChangeSetRan(Contexts, LabelExpression, Writer)method.- Parameters:
output- the output- Throws:
liquibase.exception.LiquibaseException- if the method fails
-
markNextChangeSetRan
public void markNextChangeSetRan() throws liquibase.exception.LiquibaseExceptionImplementation of theLiquibase.markNextChangeSetRan(Contexts, LabelExpression)method.- Throws:
liquibase.exception.LiquibaseException- if the method fails
-
futureRollbackSQL
public void futureRollbackSQL(String tag, Writer output) throws liquibase.exception.LiquibaseException Implementation of theLiquibase.futureRollbackSQL(String, Contexts, LabelExpression, Writer)method.- Overrides:
futureRollbackSQLin classliquibase.Liquibase- Parameters:
tag- the tagoutput- the output- Throws:
liquibase.exception.LiquibaseException- if the method fails
-
futureRollbackSQL
public void futureRollbackSQL(Integer count, Writer output, boolean checkLiquibaseTables) throws liquibase.exception.LiquibaseException Implementation of theLiquibase.futureRollbackSQL(Integer, Contexts, LabelExpression, Writer, boolean)method.- Parameters:
count- the countoutput- the outputcheckLiquibaseTables- check liquibase tables- Throws:
liquibase.exception.LiquibaseException- if the method fails
-
updateTestingRollback
public void updateTestingRollback() throws liquibase.exception.LiquibaseExceptionImplementation of theLiquibase.updateTestingRollback(String, Contexts, LabelExpression)method.- Throws:
liquibase.exception.LiquibaseException- if the method fails.
-
checkLiquibaseTables
public void checkLiquibaseTables(boolean updateExistingNullChecksums, liquibase.changelog.DatabaseChangeLog databaseChangeLog) throws liquibase.exception.LiquibaseException Implementation of theLiquibase.checkLiquibaseTables(boolean, DatabaseChangeLog, Contexts, LabelExpression)method.- Parameters:
updateExistingNullChecksums- update existing null checksumsdatabaseChangeLog- database change log- Throws:
liquibase.exception.LiquibaseException- if the method fails.
-
reportStatus
public void reportStatus(boolean verbose, Writer output) throws liquibase.exception.LiquibaseException Implementation of theLiquibase.reportStatus(boolean, Contexts, Writer)method.- Parameters:
verbose- the verbose flagoutput- the output- Throws:
liquibase.exception.LiquibaseException- if the method fails.
-
listUnexpectedChangeSets
public Collection<liquibase.changelog.RanChangeSet> listUnexpectedChangeSets() throws liquibase.exception.LiquibaseExceptionImplementation of theLiquibase.listUnexpectedChangeSets(Contexts, LabelExpression)method.- Returns:
- the collection of the ran change sets
- Throws:
liquibase.exception.LiquibaseException- if the method fails.
-
reportUnexpectedChangeSets
public void reportUnexpectedChangeSets(boolean verbose, Writer output) throws liquibase.exception.LiquibaseException Implementation of theLiquibase.reportStatus(boolean, Contexts, LabelExpression, Writer)method- Parameters:
verbose- the verbose flagoutput- the writer output- Throws:
liquibase.exception.LiquibaseException- if the method fails.
-
close
public void close() throws liquibase.exception.LiquibaseExceptionClose the database connection for the liquibase instance.- Specified by:
closein interfaceAutoCloseable- Overrides:
closein classliquibase.Liquibase- Throws:
liquibase.exception.LiquibaseException- if the method fails
-