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_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().List<RanChangeSet>getRanChangeSets(boolean allowChecksumsUpgrade)booleanhasDatabaseChangeLogTable()voidinit()Ensures the change log history container is correctly initialized for use.booleanisDatabaseChecksumsCompatible()List<Map<String,?>>queryDatabaseChangeLogTable(Database database)voidremoveFromHistory(ChangeSet changeSet)protected voidreplaceChecksum(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, resetDeploymentId, setDatabase
-
-
-
-
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
-
getRanChangeSets
public List<RanChangeSet> getRanChangeSets(boolean allowChecksumsUpgrade) throws DatabaseException
- Throws:
DatabaseException
-
queryDatabaseChangeLogTable
public List<Map<String,?>> queryDatabaseChangeLogTable(Database database) throws DatabaseException
- Throws:
DatabaseException
-
replaceChecksum
protected void replaceChecksum(ChangeSet changeSet) throws DatabaseException
- Specified by:
replaceChecksumin classAbstractChangeLogHistoryService- 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()
-
-