Package io.ebean.annotation
Annotation Type DbMigration
-
@Retention(RUNTIME) @Target(FIELD) @Repeatable(List.class) public @interface DbMigration
Annotation to specify details for DDL & Migration-generation. (e.g. defaults/renames/...) This annotation is EXPERIMENTAL and may change.- Author:
- Roland Praml, FOCONIS AG
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description Platform[]platformsSpecific platforms this migration change applies to.String[]postAddDdlScript that will be executed after the 'add' command.String[]postAlterDdlScript that will be executed after the 'alter' commandString[]preAddDdlScript that will be executed before the 'add' commandString[]preAlterDdlScripts that will be executed before the 'alter' command.
-
-
-
Element Detail
-
preAlter
String[] preAlter
DdlScripts that will be executed before the 'alter' command.You may write a custom update routine here. If you do not specify an SQL here, and this will alter the table to a non-null column, ebean will autogenerate a statement from default value like this:
UPDATE table SET column = 'foo' WHERE column IS NULL
- Default:
- {}
-
-