Package liquibase.changelog
Class OfflineChangeLogHistoryService
- java.lang.Object
-
- liquibase.changelog.AbstractChangeLogHistoryService
-
- liquibase.changelog.OfflineChangeLogHistoryService
-
- All Implemented Interfaces:
ChangeLogHistoryService
,Plugin
public class OfflineChangeLogHistoryService extends AbstractChangeLogHistoryService
-
-
Field Summary
-
Fields inherited from interface liquibase.plugin.Plugin
PRIORITY_DATABASE, PRIORITY_DEFAULT, PRIORITY_NOT_APPLICABLE, PRIORITY_SPECIALIZED
-
-
Constructor Summary
Constructors Constructor Description OfflineChangeLogHistoryService(Database database, File changeLogFile, boolean executeDmlAgainstDatabase, boolean executeDdlAgainstDatabase)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
appendChangeSet(ChangeSet changeSet, ChangeSet.ExecType execType)
void
clearAllCheckSums()
void
destroy()
int
getNextSequenceValue()
int
getPriority()
List<RanChangeSet>
getRanChangeSets()
void
init()
Ensures the change log history container is correctly initialized for use.boolean
isDatabaseChecksumsCompatible()
This method should return true if all checksums in dbcl table have the same version as {@link liquibase.ChecksumVersion#latest().getVersion()}.boolean
isExecuteDdlAgainstDatabase()
boolean
isExecuteDmlAgainstDatabase()
void
removeFromHistory(ChangeSet changeSet)
protected void
replaceChangeSet(ChangeSet changeSet, liquibase.changelog.OfflineChangeLogHistoryService.ReplaceChangeSetLogic replaceLogic)
void
replaceChecksum(ChangeSet changeSet)
By default does nothing to keep compatibility with older versions, but subclasses may like to implement this method to support checksum upgrades.void
reset()
void
setExecType(ChangeSet changeSet, ChangeSet.ExecType execType)
void
setExecuteDdlAgainstDatabase(boolean executeDdlAgainstDatabase)
void
setExecuteDmlAgainstDatabase(boolean executeDmlAgainstDatabase)
boolean
supports(Database database)
void
tag(String tagString)
boolean
tagExists(String tag)
protected void
writeHeader(File file)
-
Methods inherited from class liquibase.changelog.AbstractChangeLogHistoryService
generateDeploymentId, getDatabase, getDeploymentId, getLastDeploymentId, getRanChangeSet, getRanDate, getRunStatus, resetDeploymentId, setDatabase, upgradeChecksums
-
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
-
-
-
-
Method Detail
-
getPriority
public int getPriority()
-
supports
public boolean supports(Database database)
-
isExecuteDmlAgainstDatabase
public boolean isExecuteDmlAgainstDatabase()
-
setExecuteDmlAgainstDatabase
public void setExecuteDmlAgainstDatabase(boolean executeDmlAgainstDatabase)
-
isExecuteDdlAgainstDatabase
public boolean isExecuteDdlAgainstDatabase()
-
setExecuteDdlAgainstDatabase
public void setExecuteDdlAgainstDatabase(boolean executeDdlAgainstDatabase)
-
reset
public void reset()
- Specified by:
reset
in interfaceChangeLogHistoryService
- Overrides:
reset
in classAbstractChangeLogHistoryService
-
init
public void init() throws DatabaseException
Description copied from interface:ChangeLogHistoryService
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
-
writeHeader
protected void writeHeader(File file) throws IOException
- Throws:
IOException
-
replaceChecksum
public void replaceChecksum(ChangeSet changeSet) throws DatabaseException
Description copied from interface:ChangeLogHistoryService
By default does nothing to keep compatibility with older versions, but subclasses may like to implement this method to support checksum upgrades.- Specified by:
replaceChecksum
in interfaceChangeLogHistoryService
- Overrides:
replaceChecksum
in classAbstractChangeLogHistoryService
- Throws:
DatabaseException
-
getRanChangeSets
public List<RanChangeSet> getRanChangeSets() throws DatabaseException
- Throws:
DatabaseException
-
replaceChangeSet
protected void replaceChangeSet(ChangeSet changeSet, liquibase.changelog.OfflineChangeLogHistoryService.ReplaceChangeSetLogic replaceLogic) throws DatabaseException
- Throws:
DatabaseException
-
appendChangeSet
protected void appendChangeSet(ChangeSet changeSet, ChangeSet.ExecType execType) throws DatabaseException
- Throws:
DatabaseException
-
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
- 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
-
isDatabaseChecksumsCompatible
public boolean isDatabaseChecksumsCompatible()
Description copied from interface:ChangeLogHistoryService
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.
-
-