All Downloads are FREE. Search and download functionalities are using the official Maven repository.

s.codegen-maven-plugin.4.1.source-code.tp-GenerateDbMigration Maven / Gradle / Ivy

There is a newer version: 4.2
Show newest version
package main;

import io.ebean.annotation.Platform;
import io.ebean.dbmigration.DbMigration;

import java.io.IOException;

/**
 * Generate the DB Migration.
 */
public class GenerateDbMigration {

  public static void main(String[] args) throws Exception {

    // 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 = DbMigration.create();
    dbMigration.setPlatform(Platform.POSTGRES);
    // generate the migration ddl and xml
    dbMigration.generateMigration();
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy