ui.message("Upgrading database schema from version " + curr.versionNbr
+ " to " + versionNbr + " ...");
preUpdateSchema(db);
final JdbcExecutor e = new JdbcExecutor(s);
try {
s.updateSchema(e);
migrateData(db, ui);
if (toTargetVersion) {
final List<String> pruneList = new ArrayList<String>();
s.pruneSchema(new StatementExecutor() {
public void execute(String sql) {
pruneList.add(sql);
}
});
if (!pruneList.isEmpty()) {
ui.pruneSchema(e, pruneList);
}
}
} finally {
e.close();
}
finish(curr, db);
}