Package io.quarkus.liquibase
Class LiquibaseContext
- java.lang.Object
-
- liquibase.Liquibase
-
- io.quarkus.liquibase.LiquibaseContext
-
- All Implemented Interfaces:
AutoCloseable
public class LiquibaseContext extends liquibase.Liquibase implements AutoCloseable
The quarkus liquibase context
-
-
Constructor Summary
Constructors Constructor Description LiquibaseContext(LiquibaseConfig config, liquibase.resource.ResourceAccessor resourceAccessor, liquibase.database.Database database)The default constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidchangeLogSync()Implementation 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.ContextscreateContexts()Creates the default contexts base on the configurationliquibase.LabelExpressioncreateLabels()Creates 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.StringgetChangeLog()Gets the change log file pathList<liquibase.changelog.ChangeSetStatus>getChangeSetStatuses()Implementation of theLiquibase.getChangeSetStatuses(Contexts, LabelExpression, boolean)methodLiquibaseConfiggetConfiguration()Gets the liquibase configurationCollection<liquibase.changelog.RanChangeSet>listUnexpectedChangeSets()Implementation of theLiquibase.listUnexpectedChangeSets(Contexts, LabelExpression)method.List<liquibase.changelog.ChangeSet>listUnrunChangeSets()Implementation of theLiquibase.listUnrunChangeSets(Contexts, LabelExpression, boolean)methodvoidmarkNextChangeSetRan()Implementation 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)methodvoidrollback(int changesToRollback, String rollbackScript)Implementation of theLiquibase.rollback(int, String, Contexts, LabelExpression)method.voidrollback(int changesToRollback, String rollbackScript, Writer output)Implementation of theLiquibase.rollback(int, String, Contexts, LabelExpression, Writer)method.voidrollback(String tagToRollBackTo, String rollbackScript)Implementation of theLiquibase.rollback(String, String, Contexts, LabelExpression)method.voidrollback(String tagToRollBackTo, String rollbackScript, Writer output)Implementation of theLiquibase.rollback(String, String, Contexts, LabelExpression, Writer)method.voidrollback(Date dateToRollBackTo, String rollbackScript)Implementation of theLiquibase.rollback(Date, String, Contexts, LabelExpression)method.voidrollback(Date dateToRollBackTo, String rollbackScript, Writer output)Implementation 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.voidupdate(int changesToApply, Writer output)Implementation of theLiquibase.rollback(int, String, Contexts, LabelExpression, Writer)method.voidupdate(String tag, Writer output)Implementation of theLiquibase.update(String, Contexts, LabelExpression, Writer)methodvoidupdateTestingRollback()Implementation of theLiquibase.updateTestingRollback(String, Contexts, LabelExpression)method.-
Methods inherited from class liquibase.Liquibase
buildChangeLogIterator, buildRawSQLChange, calculateCheckSum, calculateCheckSum, changeLogSync, changeLogSync, changeLogSync, changeLogSync, changeLogSync, changeLogSync, changeLogSync, changeLogSync, changeLogSync, checkLiquibaseTables, clearCheckSums, createRollbackVisitor, createUpdateVisitor, diff, dropAll, dropAll, executeRollbackScript, forceReleaseLocks, futureRollbackSQL, futureRollbackSQL, futureRollbackSQL, futureRollbackSQL, futureRollbackSQL, futureRollbackSQL, futureRollbackSQL, futureRollbackSQL, futureRollbackSQL, futureRollbackSQL, generateChangeLog, generateChangeLog, generateDocumentation, generateDocumentation, generateDocumentation, getChangeLogFile, getChangeLogParameters, getChangeSetStatuses, getChangeSetStatuses, getChangeSetStatuses, getConnection, getDatabase, getDatabaseChangeLog, getHubConnectionId, getLog, getResourceAccessor, getStandardChangelogIterator, isSafeToRunUpdate, listLocks, listUnexpectedChangeSets, listUnexpectedChangeSets, listUnrunChangeSets, listUnrunChangeSets, listUnrunChangeSets, markNextChangeSetRan, markNextChangeSetRan, markNextChangeSetRan, markNextChangeSetRan, outputHeader, removeRunStatus, 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, setChangeLogSyncListener, setHubConnectionId, tag, tagExists, update, update, update, update, update, update, update, update, update, update, update, update, update, update, update, update, update, updateTestingRollback, updateTestingRollback, updateTestingRollback, validate
-
-
-
-
Constructor Detail
-
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 Detail
-
getConfiguration
public LiquibaseConfig getConfiguration()
Gets the liquibase configuration- Returns:
- the liquibase configuration
-
getChangeLog
public String 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.LiquibaseException
Implementation 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- Throws:
liquibase.exception.LiquibaseException- if the method fails
-
listUnrunChangeSets
public List<liquibase.changelog.ChangeSet> listUnrunChangeSets() throws liquibase.exception.LiquibaseException
Implementation of theLiquibase.listUnrunChangeSets(Contexts, LabelExpression, boolean)method- Returns:
- the list of change set
- Throws:
liquibase.exception.LiquibaseException- if the method fails
-
update
public void update(String tag, Writer output) throws liquibase.exception.LiquibaseException
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.LiquibaseExceptionImplementation of theLiquibase.rollback(int, String, Contexts, LabelExpression)method.- Parameters:
changesToApply- changes to apply- Throws:
liquibase.exception.LiquibaseException- if the method fails
-
update
public void update(int changesToApply, Writer output) throws liquibase.exception.LiquibaseExceptionImplementation 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.LiquibaseExceptionImplementation 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.LiquibaseExceptionImplementation 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:
output- the outputdateToRollBackTo- date to roll back torollbackScript- the rollback script- 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:
output- the outputdateToRollBackTo- date to roll back torollbackScript- the rollback scriptcontexts- the contextslabelExpression- the label expression- 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
public void changeLogSync(Writer output) throws liquibase.exception.LiquibaseException
Implementation of theLiquibase.changeLogSync(Contexts, LabelExpression, Writer)method.- Parameters:
output- the output- Throws:
liquibase.exception.LiquibaseException- if the method fails
-
markNextChangeSetRan
public void markNextChangeSetRan(Writer output) throws liquibase.exception.LiquibaseException
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.LiquibaseExceptionImplementation 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.LiquibaseExceptionImplementation 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.LiquibaseException
Implementation 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.LiquibaseExceptionImplementation 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
-
-