public final void check( UpdateUI ui, CurrentSchemaVersion curr, ReviewDb db, boolean toTargetVersion) throws OrmException, SQLException { if (curr.versionNbr == versionNbr) { // Nothing to do, we are at the correct schema. // } else { upgradeFrom(ui, curr, db, toTargetVersion); } }
public final void check(UpdateUI ui, CurrentSchemaVersion curr, ReviewDb db) throws OrmException, SQLException { if (curr.versionNbr == versionNbr) { // Nothing to do, we are at the correct schema. } else if (curr.versionNbr > versionNbr) { throw new OrmException( "Cannot downgrade database schema from version " + curr.versionNbr + " to " + versionNbr + "."); } else { upgradeFrom(ui, curr, db); } }