mysql_nextval = new ScriptRunner("mysql_nextval.sql");
}
public void create(final ReviewDb db) throws OrmException, IOException,
ConfigInvalidException {
final JdbcSchema jdbc = (JdbcSchema) db;
final JdbcExecutor e = new JdbcExecutor(jdbc);
try {
jdbc.updateSchema(e);
} finally {
e.close();
}
final CurrentSchemaVersion sVer = CurrentSchemaVersion.create();
sVer.versionNbr = versionNbr;
db.schemaVersion().insert(Collections.singleton(sVer));
final SystemConfig sConfig = initSystemConfig(db);
initVerifiedCategory(db);
initCodeReviewCategory(db, sConfig);
if (mgr != null) {
// TODO This should never be null when initializing a site.
initWildCardProject();
}
final SqlDialect d = jdbc.getDialect();
if (d instanceof DialectH2) {
index_generic.run(db);
} else if (d instanceof DialectMySQL) {
index_generic.run(db);