Package com.dbdeploy

Examples of com.dbdeploy.DbDeploy.go()


    DbDeploy dbDeploy = new DbDeploy();
    db.applyDatabaseSettingsTo(dbDeploy);
    dbDeploy.setScriptdirectory(findScriptDirectory("src/it/db/invalid_deltas"));
    try {
      dbDeploy.go();
    } catch (Exception ex) {
      //expected
      assertThat(ex.getMessage(), containsString("Column count does not match in statement"));
    }
View Full Code Here


    List<Object[]> results = db.executeQuery("select id from Test");
    assertThat(results.size(), is(0));

    // now run dbdeploy again with valid scripts, should recover
    dbDeploy.setScriptdirectory(findScriptDirectory("src/it/db/deltas"));
    dbDeploy.go();

    assertThat(db.getChangelogEntries(), hasItems(1L, 2L));

    results = db.executeQuery("select id from Test");
    assertThat(results.size(), is(1));
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.