@Retention(value=RUNTIME) @Target(value=FIELD) @Repeatable(value=DbMigration.List.class) public @interface DbMigration
| Modifier and Type | Optional Element and Description |
|---|---|
Platform[] |
platforms
Specific platforms this migration change applies to.
|
String[] |
postAdd
DdlScript that will be executed after the 'add' command.
|
String[] |
postAlter
DdlScript that will be executed after the 'alter' command
|
String[] |
preAdd
DdlScript that will be executed before the 'add' command
|
String[] |
preAlter
DdlScripts that will be executed before the 'alter' command.
|
public abstract String[] preAlter
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
Copyright © 2019. All rights reserved.