public class TableMigrator extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
TableMigrator.Result
Migration result.
|
| Constructor and Description |
|---|
TableMigrator(Entity entity,
Collection<ForeignKey> foreignKeys,
Backend backend,
TableMetaData table)
Creates a table migrator.
|
| Modifier and Type | Method and Description |
|---|---|
Backend |
getBackend()
Gets the backend.
|
Entity |
getEntity()
Gets the model's entity.
|
TableMetaData |
getTable()
Gets the database's table meta data.
|
TableMigrator.Result |
migrate(Collection<Pattern> hints,
Collection<ColumnMigration> columnMigrations)
Create SQL code to migrate the table.
|
String |
toString() |
public TableMigrator(Entity entity, Collection<ForeignKey> foreignKeys, Backend backend, TableMetaData table)
entity - the model's entityforeignKeys - the foreign keys related to given entitybackend - the backendtable - the database's table meta datapublic Backend getBackend()
public Entity getEntity()
public TableMetaData getTable()
public TableMigrator.Result migrate(Collection<Pattern> hints, Collection<ColumnMigration> columnMigrations) throws ModelException
hints - hints to control the created outputcolumnMigrations - explicit column migrations, null if noneModelException - if migration failedTentackle - a domain driven enterprise framework