Package com.opengamma.util.db.tool

Examples of com.opengamma.util.db.tool.DbCreateOperation


  //-------------------------------------------------------------------------
  @Override
  protected void doRun(boolean write, File outputFile) throws Exception {
    boolean dropExisting = getCommandLine().hasOption(DROP_EXISTING_OPTION);
    new DbCreateOperation(getDbToolContext(), write, outputFile, dropExisting).execute();
    if (write) {
      System.out.println("Database objects created successfully");
    }
  }
View Full Code Here


    dbToolContext.setDbManagement(dbManagement);
    dbToolContext.setCatalog(catalog);
    dbToolContext.setSchemaNames(ImmutableSet.of(schemaName));
    if (actualSchemaVersion == null) {
      // Assume empty database, so attempt to create tables
      DbCreateOperation createOperation = new DbCreateOperation(dbToolContext, true, null, false);
      createOperation.execute();
    } else if (actualSchemaVersion < expectedSchemaVersion) {
      // Upgrade from expected to actual
      DbUpgradeOperation upgradeOperation = new DbUpgradeOperation(dbToolContext, true, null);
      upgradeOperation.execute();
    } else if (expectedSchemaVersion > actualSchemaVersion) {
View Full Code Here

TOP

Related Classes of com.opengamma.util.db.tool.DbCreateOperation

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.