Instances of these objects are normally created via the ChangeFactory by liquibase. implementations.
ChangeFactory, Database
| Modifier and Type | Field and Description |
|---|---|
| public static final Change[] | EMPTY_CHANGE
Represent an empty array of |
| public static final String |
| Modifier and Type | Method and Description |
|---|---|
| public ChangeStatus | checkStatus(Database database)
Validate that this change executed successfully against the given database. |
| public ChangeMetaData | |
| public void | finishInitialization()
This method will be called by the changelog parsing process after all of the properties have been set to allow the task to do any additional initialization logic. |
| public CheckSum | |
| public SqlStatement[] | generateRollbackStatements(Database database)
Generates the |
| public boolean | generateRollbackStatementsVolatile(Database database)
Returns true if this change reads data from the database or other sources that would change during the course of an update in the |
| public SqlStatement[] | generateStatements(Database database)
Generates the |
| public boolean | generateStatementsVolatile(Database database)
Returns true if this change reads data from the database or other sources that would change during the course of an update in the |
| public Set | getAffectedDatabaseObjects(Database database)
Returns example |
| public ChangeSet | |
| public String | |
| public String | |
| public void | |
| public void | |
| public void | setResourceAccessor(ResourceAccessor resourceAccessor)
Deprecated
this is now set via
Scope
Sets the |
| public boolean | |
| public boolean | supportsRollback(Database database)
Returns true if this can change be rolled back for the given database. |
| public ValidationErrors | |
| public Warnings |
| EMPTY_CHANGE | back to summary |
|---|---|
| public static final Change[] EMPTY_CHANGE Represent an empty array of | |
| SHOULD_EXECUTE | back to summary |
|---|---|
| public static final String SHOULD_EXECUTE | |
| checkStatus | back to summary |
|---|---|
| public ChangeStatus checkStatus(Database database) Validate that this change executed successfully against the given database. This will check that the update completed at a high level plus check details of the change. For example, a change to add a column will check that the column exists plus data type, default values, etc. | |
| createChangeMetaData | back to summary |
|---|---|
| public ChangeMetaData createChangeMetaData() | |
| finishInitialization | back to summary |
|---|---|
| public void finishInitialization() throws SetupException This method will be called by the changelog parsing process after all of the properties have been set to allow the task to do any additional initialization logic. | |
| generateCheckSum | back to summary |
|---|---|
| public CheckSum generateCheckSum() Calculates the checksum of this Change based on the current configuration. The checksum should take into account all settings that would impact what actually happens to the database and NOT include any settings that do not impact the actual execution of the change. | |
| generateRollbackStatements | back to summary |
|---|---|
| public SqlStatement[] generateRollbackStatements(Database database) throws RollbackImpossibleException Generates the generateRollbackStatementsVolatile.
| |
| generateRollbackStatementsVolatile | back to summary |
|---|---|
| public boolean generateRollbackStatementsVolatile(Database database) Returns true if this change reads data from the database or other sources that would change during the course of an update in the | |
| generateStatements | back to summary |
|---|---|
| public SqlStatement[] generateStatements(Database database) Generates the generateStatementsVolatile.
| |
| generateStatementsVolatile | back to summary |
|---|---|
| public boolean generateStatementsVolatile(Database database) Returns true if this change reads data from the database or other sources that would change during the course of an update in the | |
| getAffectedDatabaseObjects | back to summary |
|---|---|
| public Set Returns example | |
| getChangeSet | back to summary |
|---|---|
| public ChangeSet getChangeSet() Returns the changeSet this Change is part of. Will return null if this instance was not constructed as part of a changelog file. | |
| getConfirmationMessage | back to summary |
|---|---|
| public String getConfirmationMessage() Confirmation message to be displayed after the change is executed. Should include relevant configuration settings to make it as helpful as possible. This method may be called outside the changelog execution process, such as in documentation generation. | |
| getDescription | back to summary |
|---|---|
| public String getDescription() Short, scannable description for the DATABASECHANGELOG.DESCRIPTION column | |
| modify | back to summary |
|---|---|
public void modify(ChangeVisitor changeVisitor) throws ParsedNodeException
| |
| setChangeSet | back to summary |
|---|---|
| public void setChangeSet(ChangeSet changeSet) Sets the changeSet this Change is a part of. Called automatically by Liquibase during the changelog parsing process. | |
| setResourceAccessor | back to summary |
|---|---|
| public void setResourceAccessor(ResourceAccessor resourceAccessor)
Deprecated this is now set via Sets the | |
| supports | back to summary |
|---|---|
| public boolean supports(Database database) Return true if this Change object supports the passed database. Used by the ChangeLog parsing process. | |
| supportsRollback | back to summary |
|---|---|
| public boolean supportsRollback(Database database) Returns true if this can change be rolled back for the given database. | |
| validate | back to summary |
|---|---|
| public ValidationErrors validate(Database database) Generate errors based on the configured Change instance. If there are any validation errors, changelog processing will normally not occur. Can return null or empty ValidationErrors object when there are no errors. | |
| warn | back to summary |
|---|---|
| public Warnings warn(Database database) Generates warnings based on the configured Change instance. Warnings do not stop changelog execution, but are passed along to the end user for reference. Can return null or an empty Warnings object when there are no warnings. | |