public boolean ensureDbInitialized(Connection con) throws SQLException {
assert(null != con);
- boolean result = true;
if (allTablesPresent(con)) {
return true;
}
- result = createAllTables(con);
+ if (!createAllTables(con)) {
+ return false;
+ }
- return result;
+ return true;
}
boolean allTablesPresent(Connection con) throws SQLException
}
// We could be more thorough here, and check that the expected columns are in place.
+ // Also, eventually, some sort of DB schema versioning will be needed.
return true;
}