Class ModelContainer
java.lang.Object
io.ebeaninternal.dbmigration.model.ModelContainer
Holds all the tables, views, indexes etc that represent the model.
Migration changeSets can be applied to the model.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd an index.Add a table (typically from reading EbeanServer meta data).voidaddTableElementCollection(MTable table)Add an element table taking into account if it is reused/references back to multiple bean types (and so can't have foreign key).voidAdjust the FK references on all the draft tables.voidApply a migration with associated changeSets to the model.booleanReturn true if the index does not exist and should be dropped.Lookup the matching index during DIFF migration processing.Return the list of partitioned tables.Return the list of versions containing un-applied pending drops.Return the schemas.Return the table by name.Return the map of all the tables.booleanReturn true if the model contains tables that are partitioned.migrationForPendingDrop(String pendingVersion)Return the migration for the pending drops for a given version.voidregisterPendingHistoryDropColumns(ChangeSet changeSet)Register any pending drop columns on history tables.voidregisterPendingHistoryDropColumns(ModelContainer newModel)Register the drop columns on history tables that have not been applied yet.
-
Constructor Details
-
ModelContainer
public ModelContainer()
-
-
Method Details
-
getSchemas
Return the schemas. -
isTablePartitioning
Return true if the model contains tables that are partitioned. -
getPartitionedTables
Return the list of partitioned tables. -
adjustDraftReferences
Adjust the FK references on all the draft tables. -
getTables
Return the map of all the tables. -
getTable
Return the table by name. -
getIndex
Lookup the matching index during DIFF migration processing. -
allIndexes
-
dropIndex
Return true if the index does not exist and should be dropped. -
apply
Apply a migration with associated changeSets to the model. -
addTable
Add a table (typically from reading EbeanServer meta data). -
addTableElementCollection
Add an element table taking into account if it is reused/references back to multiple bean types (and so can't have foreign key). -
addIndex
Add an index. -
getPendingDrops
Return the list of versions containing un-applied pending drops. -
migrationForPendingDrop
Return the migration for the pending drops for a given version. -
registerPendingHistoryDropColumns
Register the drop columns on history tables that have not been applied yet. -
registerPendingHistoryDropColumns
Register any pending drop columns on history tables. These columns are now not in the current logical model but we still need to include them in the history views and triggers until they are actually dropped.
-