Package liquibase.changelog
Class StandardChangeLogHistoryService
- java.lang.Object
-
- liquibase.changelog.AbstractChangeLogHistoryService
-
- liquibase.changelog.StandardChangeLogHistoryService
-
- All Implemented Interfaces:
ChangeLogHistoryService,Plugin
public class StandardChangeLogHistoryService extends AbstractChangeLogHistoryService
-
-
Field Summary
Fields Modifier and Type Field Description protected static StringCONTEXTS_SIZEprotected static StringLABELS_SIZE-
Fields inherited from interface liquibase.plugin.Plugin
PRIORITY_DATABASE, PRIORITY_DEFAULT, PRIORITY_NOT_APPLICABLE, PRIORITY_SPECIALIZED
-
-
Constructor Summary
Constructors Constructor Description StandardChangeLogHistoryService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanCreateChangeLogTable()voidclearAllCheckSums()voiddestroy()protected StringgetCharTypeName()protected StringgetContextsSize()StringgetDatabaseChangeLogTableName()protected StringgetLabelsSize()StringgetLiquibaseCatalogName()StringgetLiquibaseSchemaName()intgetNextSequenceValue()intgetPriority()RanChangeSetgetRanChangeSet(ChangeSet changeSet)List<RanChangeSet>getRanChangeSets()Returns the ChangeSets that have been run against the current getDatabase().booleanhasDatabaseChangeLogTable()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()}.List<Map<String,?>>queryDatabaseChangeLogTable(Database database)voidremoveFromHistory(ChangeSet changeSet)voidreset()voidsetExecType(ChangeSet changeSet, ChangeSet.ExecType execType)booleansupports(Database database)voidtag(String tagString)Tags the database changelog with the given string.booleantagExists(String tag)voidupgradeChecksums(DatabaseChangeLog databaseChangeLog, Contexts contexts, LabelExpression labels)Updates null checksum values-
Methods inherited from class liquibase.changelog.AbstractChangeLogHistoryService
generateDeploymentId, getDatabase, getDeploymentId, getLastDeploymentId, getRanDate, getRunStatus, replaceChecksum, resetDeploymentId, setDatabase
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface liquibase.changelog.ChangeLogHistoryService
getRanChangeSets
-
-
-
-
Field Detail
-
LABELS_SIZE
protected static final String LABELS_SIZE
- See Also:
- Constant Field Values
-
CONTEXTS_SIZE
protected static final String CONTEXTS_SIZE
- See Also:
- Constant Field Values
-
-
Method Detail
-
getPriority
public int getPriority()
-
supports
public boolean supports(Database database)
-
getDatabaseChangeLogTableName
public String getDatabaseChangeLogTableName()
-
getLiquibaseSchemaName
public String getLiquibaseSchemaName()
-
getLiquibaseCatalogName
public String getLiquibaseCatalogName()
-
canCreateChangeLogTable
public boolean canCreateChangeLogTable()
-
reset
public void reset()
- Specified by:
resetin interfaceChangeLogHistoryService- Overrides:
resetin classAbstractChangeLogHistoryService
-
hasDatabaseChangeLogTable
public boolean hasDatabaseChangeLogTable()
-
getCharTypeName
protected String getCharTypeName()
-
init
public void init() throws DatabaseExceptionDescription 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.- 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- Overrides:
upgradeChecksumsin classAbstractChangeLogHistoryService- Throws:
DatabaseException
-
getRanChangeSets
public List<RanChangeSet> getRanChangeSets() throws DatabaseException
Returns the ChangeSets that have been run against the current getDatabase().- Throws:
DatabaseException
-
queryDatabaseChangeLogTable
public List<Map<String,?>> queryDatabaseChangeLogTable(Database database) throws DatabaseException
- Throws:
DatabaseException
-
getRanChangeSet
public RanChangeSet getRanChangeSet(ChangeSet changeSet) throws DatabaseException, DatabaseHistoryException
- Specified by:
getRanChangeSetin interfaceChangeLogHistoryService- Overrides:
getRanChangeSetin classAbstractChangeLogHistoryService- Throws:
DatabaseExceptionDatabaseHistoryException
-
setExecType
public void setExecType(ChangeSet changeSet, ChangeSet.ExecType execType) throws DatabaseException
- Throws:
DatabaseException
-
removeFromHistory
public void removeFromHistory(ChangeSet changeSet) throws DatabaseException
- Throws:
DatabaseException
-
getNextSequenceValue
public int getNextSequenceValue() throws LiquibaseException- Throws:
LiquibaseException
-
tag
public void tag(String tagString) throws DatabaseException
Tags the database changelog with the given string.- Throws:
DatabaseException
-
tagExists
public boolean tagExists(String tag) throws DatabaseException
- Throws:
DatabaseException
-
clearAllCheckSums
public void clearAllCheckSums() throws LiquibaseException- Throws:
LiquibaseException
-
destroy
public void destroy() throws DatabaseException- Throws:
DatabaseException
-
getLabelsSize
protected String getLabelsSize()
-
getContextsSize
protected String getContextsSize()
-
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.- Returns:
- false if we have checksums different from {@link liquibase.ChecksumVersion#latest().getVersion()} in the dbcl table.
-
-