Package liquibase.changelog
Interface ChangeLogHistoryService
-
- All Superinterfaces:
Plugin
- All Known Implementing Classes:
AbstractChangeLogHistoryService,MockChangeLogHistoryService,OfflineChangeLogHistoryService,StandardChangeLogHistoryService
public interface ChangeLogHistoryService extends Plugin
-
-
Field Summary
-
Fields inherited from interface liquibase.plugin.Plugin
PRIORITY_DATABASE, PRIORITY_DEFAULT, PRIORITY_NOT_APPLICABLE, PRIORITY_SPECIALIZED
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description voidclearAllCheckSums()voiddestroy()voidgenerateDeploymentId()StringgetDeploymentId()intgetNextSequenceValue()intgetPriority()RanChangeSetgetRanChangeSet(ChangeSet changeSet)List<RanChangeSet>getRanChangeSets()default List<RanChangeSet>getRanChangeSets(boolean allowChecksumsUpgrade)Deprecated.usegetRanChangeSets()insteadDategetRanDate(ChangeSet changeSet)Returns the date the given changeSet was ran.ChangeSet.RunStatusgetRunStatus(ChangeSet changeSet)voidinit()Ensures the change log history container is correctly initialized for use.booleanisDatabaseChecksumsCompatible()This method should return true if all checksums in dbcl table have the same version as {@link liquibase.ChecksumVersion#latest().getVersion()}.voidremoveFromHistory(ChangeSet changeSet)default voidreplaceChecksum(ChangeSet changeSet)By default does nothing to keep compatibility with older versions, but subclasses may like to implement this method to support checksum upgrades.voidreset()voidresetDeploymentId()voidsetDatabase(Database database)voidsetExecType(ChangeSet changeSet, ChangeSet.ExecType execType)booleansupports(Database database)voidtag(String tagString)booleantagExists(String tag)voidupgradeChecksums(DatabaseChangeLog databaseChangeLog, Contexts contexts, LabelExpression labels)Updates null checksum values
-
-
-
Method Detail
-
getPriority
int getPriority()
-
supports
boolean supports(Database database)
-
setDatabase
void setDatabase(Database database)
-
reset
void reset()
-
init
void init() throws DatabaseException
Ensures the change log history container is correctly initialized for use. This method may be called multiple times so it should check state as needed.- Throws:
DatabaseException
-
upgradeChecksums
void upgradeChecksums(DatabaseChangeLog databaseChangeLog, Contexts contexts, LabelExpression labels) throws DatabaseException
Updates null checksum values- Throws:
DatabaseException
-
getRanChangeSets
List<RanChangeSet> getRanChangeSets() throws DatabaseException
- Throws:
DatabaseException
-
getRanChangeSets
@Deprecated default List<RanChangeSet> getRanChangeSets(boolean allowChecksumsUpgrade) throws DatabaseException
Deprecated.usegetRanChangeSets()insteadThis 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().- Parameters:
allowChecksumsUpgrade-- Throws:
DatabaseException
-
getRanChangeSet
RanChangeSet getRanChangeSet(ChangeSet changeSet) throws DatabaseException, DatabaseHistoryException
-
getRunStatus
ChangeSet.RunStatus getRunStatus(ChangeSet changeSet) throws DatabaseException, DatabaseHistoryException
-
getRanDate
Date getRanDate(ChangeSet changeSet) throws DatabaseException, DatabaseHistoryException
Returns the date the given changeSet was ran. Returns null if changeSet was not null.
-
setExecType
void setExecType(ChangeSet changeSet, ChangeSet.ExecType execType) throws DatabaseException
- Throws:
DatabaseException
-
removeFromHistory
void removeFromHistory(ChangeSet changeSet) throws DatabaseException
- Throws:
DatabaseException
-
getNextSequenceValue
int getNextSequenceValue() throws LiquibaseException- Throws:
LiquibaseException
-
tag
void tag(String tagString) throws DatabaseException
- Throws:
DatabaseException
-
tagExists
boolean tagExists(String tag) throws DatabaseException
- Throws:
DatabaseException
-
clearAllCheckSums
void clearAllCheckSums() throws LiquibaseException- Throws:
LiquibaseException
-
destroy
void destroy() throws DatabaseException- Throws:
DatabaseException
-
getDeploymentId
String getDeploymentId()
-
resetDeploymentId
void resetDeploymentId()
-
generateDeploymentId
void generateDeploymentId()
-
isDatabaseChecksumsCompatible
boolean isDatabaseChecksumsCompatible()
This 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.- Returns:
- false if we have checksums different from {@link liquibase.ChecksumVersion#latest().getVersion()} in the dbcl table.
-
replaceChecksum
default void replaceChecksum(ChangeSet changeSet) throws DatabaseException
By default does nothing to keep compatibility with older versions, but subclasses may like to implement this method to support checksum upgrades.- Throws:
DatabaseException
-
-