liquibase.changelog.visitor.ValidatingVisitor class
and may make it more complex than it should be
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| private static boolean | |
| private static boolean | |
| private static ChangeSet | generateNewChangeSet(DatabaseChangeLog databaseChangeLog, Change originalChange, Change newChange, ChangeSet changeSet)
|
| public static boolean | isChecksumIssue(ChangeSet changeSet, RanChangeSet ranChangeSet, DatabaseChangeLog databaseChangeLog, Database database)
|
| private static void | revertIgnoreOriginalSplitStatementsFlag(ChangeSet changeSet, List<AbstractSQLChange> changes)
This method reverses flag ignoreOriginalSplitStatements on the AbstractSQLChange list and clears the changeset calculated checksum so it is recalculated when it's used again |
| private static void | setUp421xChecksumFlagForCreateFunctionChange(List<Change> changes, boolean set)
AS we don't have core here, we use reflection to call this method that changes the checksum behavior for this specific class. |
| private static boolean | validateAbstractSqlChangeV8ChecksumVariant(ChangeSet changeSet, RanChangeSet ranChangeSet)
AbstractSqlChange checksum had the checksum calculated value changed for Liquibase versions 4.19.1 to 4.23.1 due to some changes on the way that we call it when using runWith="anything". |
| private static boolean | validateCreateFunctionChangeV8ChecksumVariant(ChangeSet changeSet, RanChangeSet ranChangeSet)
CreateFunctionChange checksum had the calculated value changed for Liquibase versions 4.21.X due to incorrect annotations being added to CreateProcedureChange . |
| private static boolean | validateMongoDbExtensionIssue(ChangeSet changeSet, RanChangeSet ranChangeSet, DatabaseChangeLog databaseChangeLog, Database database)
MongoDB's extension was incorrectly messing with CreateIndex and DropIndex checksums when the extension was added to the lib folder but a database other than mongodb was used. |
| private static boolean | validateSqlFileChangeAndExpandExpressions(ChangeSet changeSet, RanChangeSet ranChangeSet, Database database)
returns true iff the changeset's checksum was incorrect due to SQLFileChange doing property substitution on the contents of an external SQL file. |
| ValidatingVisitorUtil | back to summary |
|---|---|
| private ValidatingVisitorUtil() | |
| checkLiquibaseVersionIs | back to summary |
|---|---|
| private static boolean checkLiquibaseVersionIs(String version, int major, int minor) | |
| checkLiquibaseVersionMinorThan | back to summary |
|---|---|
| private static boolean checkLiquibaseVersionMinorThan(String version, int major, int minor) | |
| generateNewChangeSet | back to summary |
|---|---|
| private static ChangeSet generateNewChangeSet(DatabaseChangeLog databaseChangeLog, Change originalChange, Change newChange, ChangeSet changeSet) | |
| isChecksumIssue | back to summary |
|---|---|
| public static boolean isChecksumIssue(ChangeSet changeSet, RanChangeSet ranChangeSet, DatabaseChangeLog databaseChangeLog, Database database) | |
| revertIgnoreOriginalSplitStatementsFlag | back to summary |
|---|---|
| private static void revertIgnoreOriginalSplitStatementsFlag(ChangeSet changeSet, List<AbstractSQLChange> changes) This method reverses flag ignoreOriginalSplitStatements on the AbstractSQLChange list and clears the changeset calculated checksum so it is recalculated when it's used again | |
| setUp421xChecksumFlagForCreateFunctionChange | back to summary |
|---|---|
| private static void setUp421xChecksumFlagForCreateFunctionChange(List<Change> changes, boolean set) AS we don't have core here, we use reflection to call this method that changes the checksum behavior for this specific class. | |
| validateAbstractSqlChangeV8ChecksumVariant | back to summary |
|---|---|
| private static boolean validateAbstractSqlChangeV8ChecksumVariant(ChangeSet changeSet, RanChangeSet ranChangeSet) AbstractSqlChange checksum had the checksum calculated value changed for Liquibase versions 4.19.1 to 4.23.1 due to some changes on the way that we call it when using runWith="anything". This method validates the v8 checksum using the alternative algorithm as a way to allow users to upgrade to checksums v9 without facing any errors or unexpected behaviours. To accomplish that it will check for: * do we have runWith set? * are we working with a v8 checksum? * does this change extends from AbstractSQLChange? * Changing splitStaments makes it work? | |
| validateCreateFunctionChangeV8ChecksumVariant | back to summary |
|---|---|
| private static boolean validateCreateFunctionChangeV8ChecksumVariant(ChangeSet changeSet, RanChangeSet ranChangeSet) CreateFunctionChange checksum had the calculated value changed for Liquibase versions 4.21.X due to incorrect annotations being added to CreateProcedureChange . This method validates the v8 checksum using the alternative algorithm as a way to allow users to upgrade to checksums v9 without facing any errors or unexpected behaviours. | |
| validateMongoDbExtensionIssue | back to summary |
|---|---|
| private static boolean validateMongoDbExtensionIssue(ChangeSet changeSet, RanChangeSet ranChangeSet, DatabaseChangeLog databaseChangeLog, Database database) MongoDB's extension was incorrectly messing with CreateIndex and DropIndex checksums when the extension was added to the lib folder but a database other than mongodb was used. This method checks: * is it a CreateIndex or DropIndex change? * are we not using mongo? * do we have mongo extension loaded? * If I use CreateIndex or DropIndex from mongo extension, does the checksum matches? If everything matches than we fix the checksum on the database and say it's fine to continue. | |
| validateSqlFileChangeAndExpandExpressions | back to summary |
|---|---|
| private static boolean validateSqlFileChangeAndExpandExpressions(ChangeSet changeSet, RanChangeSet ranChangeSet, Database database) returns true iff the changeset's checksum was incorrect due to SQLFileChange doing property substitution on the contents of an external SQL file. If it returns true, the changeset's checksum has been fixed. | |