Class BaseTableDdl
java.lang.Object
io.ebeaninternal.dbmigration.ddlgeneration.platform.BaseTableDdl
- All Implemented Interfaces:
TableDdl
- Direct Known Subclasses:
ClickHouseTableDdl,HanaTableDdl
Base implementation for 'create table' and 'alter table' statements.
-
Constructor Summary
ConstructorsConstructorDescriptionBaseTableDdl(io.ebean.config.DatabaseConfig config, PlatformDdl platformDdl)Construct with a naming convention and platform specific DDL. -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd add column DDL.voidgenerate(DdlWrite writer, AddHistoryTable addHistoryTable)Add add history table DDL.voidgenerate(DdlWrite writer, AddTableComment addTableComment)Write the AddTableComment change.voidgenerate(DdlWrite writer, AddUniqueConstraint constraint)Write add unique constraint.voidgenerate(DdlWrite writer, AlterColumn alterColumn)Add all the appropriate changes based on the column changes.voidgenerate(DdlWrite writer, AlterForeignKey alterForeignKey)Writes alter foreign key statements.voidgenerate(DdlWrite writer, CreateIndex index)Generate the create index change.voidgenerate(DdlWrite writer, CreateTable createTable)Generate the appropriate 'create table' and matching 'drop table' statements and add them to the appropriate 'apply' and 'rollback' buffers.voidgenerate(DdlWrite writer, DropColumn dropColumn)Add drop column DDL.voidgenerate(DdlWrite writer, DropHistoryTable dropHistoryTable)Add drop history table DDL.voidWrite the drop index change.voidAdd drop table DDL.voidgenerateEpilog(DdlWrite write)Called at the end to generate additional ddl such as regenerate history triggers.voidgenerateProlog(DdlWrite write)Generate any extra DDL such as stored procedures or TableValueParameters.
-
Constructor Details
-
BaseTableDdl
Construct with a naming convention and platform specific DDL.
-
-
Method Details
-
generate
Generate the appropriate 'create table' and matching 'drop table' statements and add them to the appropriate 'apply' and 'rollback' buffers.- Specified by:
generatein interfaceTableDdl- Throws:
IOException
-
generate
Description copied from interface:TableDdlGenerate the create index change.- Specified by:
generatein interfaceTableDdl- Throws:
IOException
-
generate
Description copied from interface:TableDdlWrite the drop index change.- Specified by:
generatein interfaceTableDdl- Throws:
IOException
-
generate
Description copied from interface:TableDdlWrite add unique constraint.- Specified by:
generatein interfaceTableDdl- Throws:
IOException
-
generate
Description copied from interface:TableDdlWrites alter foreign key statements.- Specified by:
generatein interfaceTableDdl- Throws:
IOException
-
generate
Add add history table DDL.- Specified by:
generatein interfaceTableDdl- Throws:
IOException
-
generate
Add drop history table DDL.- Specified by:
generatein interfaceTableDdl- Throws:
IOException
-
generateProlog
Description copied from interface:TableDdlGenerate any extra DDL such as stored procedures or TableValueParameters.- Specified by:
generatePrologin interfaceTableDdl- Throws:
IOException
-
generateEpilog
Called at the end to generate additional ddl such as regenerate history triggers.- Specified by:
generateEpilogin interfaceTableDdl- Throws:
IOException
-
generate
Description copied from interface:TableDdlWrite the AddTableComment change.- Specified by:
generatein interfaceTableDdl- Throws:
IOException
-
generate
Add add column DDL.- Specified by:
generatein interfaceTableDdl- Throws:
IOException
-
generate
Add drop table DDL.- Specified by:
generatein interfaceTableDdl- Throws:
IOException
-
generate
Add drop column DDL.- Specified by:
generatein interfaceTableDdl- Throws:
IOException
-
generate
Add all the appropriate changes based on the column changes.- Specified by:
generatein interfaceTableDdl- Throws:
IOException
-