/** Ensure the database schema has been created and initialized. */
public InMemoryDatabase create() throws OrmException {
if (!created) {
created = true;
final ReviewDb c = open();
try {
try {
new SchemaCreator(
new File("."),
schemaVersion,
null,
new AllProjectsName("Test-Projects"),
new PersonIdent("name", "email@site")).create(c);
} catch (IOException e) {
throw new OrmException("Cannot create in-memory database", e);
} catch (ConfigInvalidException e) {
throw new OrmException("Cannot create in-memory database", e);
}
} finally {
c.close();
}
}
return this;
}