public class MySqlModelComparator extends ModelComparator
| Constructor and Description |
|---|
MySqlModelComparator(PlatformInfo platformInfo,
TableDefinitionChangesPredicate tableDefChangePredicate,
boolean caseSensitive)
Creates a new MySql model comparator object.
|
| Modifier and Type | Method and Description |
|---|---|
protected List |
checkForRemovedIndexes(Database sourceModel,
Table sourceTable,
Database intermediateModel,
Table intermediateTable,
Database targetModel,
Table targetTable)
Creates change objects for indexes that are present in the given source table but are no longer in the target
table, and applies them to the given intermediate model.
|
protected List |
compareTables(Database sourceModel,
Table sourceTable,
Database intermediateModel,
Table intermediateTable,
Database targetModel,
Table targetTable)
Compares the two tables and returns the changes necessary to create the second
table from the first one.
|
checkForAddedColumns, checkForAddedForeignKeys, checkForAddedIndexes, checkForAddedTables, checkForChangedColumns, checkForChangeOfColumnOrder, checkForPrimaryKeyChanges, checkForRemovedColumns, checkForRemovedForeignKeys, checkForRemovedTables, compare, compareColumns, compareModels, findCorrespondingForeignKey, findCorrespondingIndex, getIntermediateColumnNamesFor, getPlatformInfo, isCaseSensitive, setCanDropPrimaryKeyColumns, setGeneratePrimaryKeyChangespublic MySqlModelComparator(PlatformInfo platformInfo, TableDefinitionChangesPredicate tableDefChangePredicate, boolean caseSensitive)
platformInfo - The platform infotableDefChangePredicate - The predicate that defines whether tables changes are supported
by the platform or not; all changes are supported if this is nullcaseSensitive - Whether comparison is case sensitiveprotected List checkForRemovedIndexes(Database sourceModel, Table sourceTable, Database intermediateModel, Table intermediateTable, Database targetModel, Table targetTable)
checkForRemovedIndexes in class ModelComparatorsourceModel - The source modelsourceTable - The source tableintermediateModel - The intermediate model to apply the changes tointermediateTable - The table from the intermediate model corresponding to the source tabletargetModel - The target modeltargetTable - The target tableprotected List compareTables(Database sourceModel, Table sourceTable, Database intermediateModel, Table intermediateTable, Database targetModel, Table targetTable)
compareTables in class ModelComparatorsourceModel - The source modelsourceTable - The source tableintermediateModel - The intermediate model to which the changes will be applied incrementallyintermediateTable - The table corresponding to the source table in the intermediate modeltargetModel - The target model which contains the target tabletargetTable - The target tableCopyright © 2010-2015 Pivotal Software, Inc. All rights reserved.