forked from ebean-orm/examples
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMainDbMigration.java
More file actions
27 lines (20 loc) · 781 Bytes
/
Copy pathMainDbMigration.java
File metadata and controls
27 lines (20 loc) · 781 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package main;
import com.avaje.ebean.config.dbplatform.DbPlatformName;
import com.avaje.ebean.dbmigration.DbMigration;
import java.io.IOException;
/**
* Generate the DB Migration.
*/
public class MainDbMigration {
public static void main(String[] args) throws IOException, InterruptedException {
// optionally specify the version and name
//System.setProperty("ddl.migration.version", "1.2_33");
//System.setProperty("ddl.migration.name", "");
// generate a migration using drops from a prior version
//System.setProperty("ddl.migration.pendingDropsFor", "1.1");
DbMigration dbMigration = new DbMigration();
dbMigration.setPlatform(DbPlatformName.POSTGRES);
// generate the migration ddl and xml
dbMigration.generateMigration();
}
}