Package liquibase.changelog
Class MockChangeLogHistoryService
java.lang.Object
liquibase.changelog.MockChangeLogHistoryService
- All Implemented Interfaces:
ChangeLogHistoryService,Plugin
-
Field Summary
FieldsFields inherited from interface liquibase.plugin.Plugin
PRIORITY_DATABASE, PRIORITY_DEFAULT, PRIORITY_NOT_APPLICABLE, PRIORITY_SPECIALIZED -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoiddestroy()voidDeprecated.This is now handled automatically by the root scopeDeprecated.intintgetRanChangeSet(ChangeSet changeSet) getRanChangeSets(boolean a) This method was created to clear out MD5sum for upgrade purpose but after some refactoring the logic was moved to Update commands and it should have been removed as everywhere it is called only with boolean false, so for core it is the same as getRanChangeSets().getRanDate(ChangeSet changeSet) Returns the date the given changeSet was run.getRunStatus(ChangeSet changeSet) voidinit()Ensures the change log history container is correctly initialized for use.booleanThis method should return true if all checksums in dbcl table have the same version as {@link liquibase.ChecksumVersion#latest().getVersion()}.voidremoveFromHistory(ChangeSet changeSet) voidreset()voidDeprecated.This is now handled automatically by the root scopevoidsetDatabase(Database database) voidsetExecType(ChangeSet changeSet, ChangeSet.ExecType execType) booleanvoidbooleanvoidupgradeChecksums(DatabaseChangeLog databaseChangeLog, Contexts contexts, LabelExpression labels) Updates null checksum valuesMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface liquibase.changelog.ChangeLogHistoryService
replaceChecksum, replaceFilePath
-
Field Details
-
ranChangeSets
-
-
Constructor Details
-
MockChangeLogHistoryService
public MockChangeLogHistoryService()
-
-
Method Details
-
getPriority
public int getPriority()- Specified by:
getPriorityin interfaceChangeLogHistoryService
-
supports
- Specified by:
supportsin interfaceChangeLogHistoryService
-
setDatabase
- Specified by:
setDatabasein interfaceChangeLogHistoryService
-
reset
public void reset()- Specified by:
resetin interfaceChangeLogHistoryService
-
init
Description copied from interface:ChangeLogHistoryServiceEnsures the change log history container is correctly initialized for use. This method may be called multiple times so it should check state as needed.- Specified by:
initin interfaceChangeLogHistoryService- Throws:
DatabaseException
-
upgradeChecksums
public void upgradeChecksums(DatabaseChangeLog databaseChangeLog, Contexts contexts, LabelExpression labels) throws DatabaseException Description copied from interface:ChangeLogHistoryServiceUpdates null checksum values- Specified by:
upgradeChecksumsin interfaceChangeLogHistoryService- Throws:
DatabaseException
-
getRanChangeSets
- Specified by:
getRanChangeSetsin interfaceChangeLogHistoryService- Throws:
DatabaseException
-
getRanChangeSets
Description copied from interface:ChangeLogHistoryServiceThis method was created to clear out MD5sum for upgrade purpose but after some refactoring the logic was moved to Update commands and it should have been removed as everywhere it is called only with boolean false, so for core it is the same as getRanChangeSets().- Specified by:
getRanChangeSetsin interfaceChangeLogHistoryService- Throws:
DatabaseException
-
getRanChangeSet
public RanChangeSet getRanChangeSet(ChangeSet changeSet) throws DatabaseException, DatabaseHistoryException - Specified by:
getRanChangeSetin interfaceChangeLogHistoryService- Throws:
DatabaseExceptionDatabaseHistoryException
-
getRunStatus
public ChangeSet.RunStatus getRunStatus(ChangeSet changeSet) throws DatabaseException, DatabaseHistoryException - Specified by:
getRunStatusin interfaceChangeLogHistoryService- Throws:
DatabaseExceptionDatabaseHistoryException
-
getRanDate
Description copied from interface:ChangeLogHistoryServiceReturns the date the given changeSet was run. Returns null if changeSet was not null.- Specified by:
getRanDatein interfaceChangeLogHistoryService- Throws:
DatabaseExceptionDatabaseHistoryException
-
setExecType
- Specified by:
setExecTypein interfaceChangeLogHistoryService- Throws:
DatabaseException
-
removeFromHistory
- Specified by:
removeFromHistoryin interfaceChangeLogHistoryService- Throws:
DatabaseException
-
getNextSequenceValue
- Specified by:
getNextSequenceValuein interfaceChangeLogHistoryService- Throws:
LiquibaseException
-
tag
- Specified by:
tagin interfaceChangeLogHistoryService- Throws:
DatabaseException
-
tagExists
- Specified by:
tagExistsin interfaceChangeLogHistoryService- Throws:
DatabaseException
-
clearAllCheckSums
- Specified by:
clearAllCheckSumsin interfaceChangeLogHistoryService- Throws:
LiquibaseException
-
destroy
- Specified by:
destroyin interfaceChangeLogHistoryService- Throws:
DatabaseException
-
getDeploymentId
Deprecated.- Specified by:
getDeploymentIdin interfaceChangeLogHistoryService
-
resetDeploymentId
Deprecated.This is now handled automatically by the root scope- Specified by:
resetDeploymentIdin interfaceChangeLogHistoryService
-
generateDeploymentId
Deprecated.This is now handled automatically by the root scope- Specified by:
generateDeploymentIdin interfaceChangeLogHistoryService
-
isDatabaseChecksumsCompatible
public boolean isDatabaseChecksumsCompatible()Description copied from interface:ChangeLogHistoryServiceThis method should return true if all checksums in dbcl table have the same version as {@link liquibase.ChecksumVersion#latest().getVersion()}. This method is used by Update command family in order to know if there are old checksum versions in the database that should be updated or if it can proceed with fast checksum update process. IF your implementation does not validate dbcl table then return false.- Specified by:
isDatabaseChecksumsCompatiblein interfaceChangeLogHistoryService- Returns:
- false if we have checksums different from {@link liquibase.ChecksumVersion#latest().getVersion()} in the dbcl table.
-