Feature/ddl migration (#1111)

* REFACTOR: use functions from ddl-help

* NEW: Default values are written to DDL

* fix testcase for sqlserver as default constraints will get names in future

* Reading DbMigration

* ADD: DbmIgrationGenerateTest

* Tables must be created first

* Sanity checks and some getters

* DdlMigration gets applied now

* ADD: Testcase and reference migration scripts

* no effective code changes: add comments
This commit is contained in:
Roland Praml authored and Rob Bygrave committed 2017-09-08 21:47:33 +12:00
1 parent 73b3d1d977
commit dd8fff0277
90 files changed
+2767 -70

No files matched your search

@@ -0,0 +1,26 @@
package misc.migration.v1_1;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import io.ebean.Platform;
import io.ebean.annotation.DbComment;
import io.ebean.annotation.DbMigration;
import io.ebean.annotation.History;
@Entity
@Table(name = "migtest_e_history")
@History
@DbComment("We have history now")
public class EHistory {
@Id
Integer id;
@DbComment("Column altered to long now")
@DbMigration(platforms = Platform.POSTGRES,
preAlter = "alter table ${table} alter column ${column} TYPE bigint USING (${column}::integer)")
Long testString;
}