added some message outputs, edited libs in register html
This commit is contained in:
@ -152,12 +152,12 @@ public class JDBC {
|
||||
*/
|
||||
public void checkDBStructure() {
|
||||
try {
|
||||
|
||||
ResultSet seti = executeQuery("SELECT COUNT(*) FROM information_schema.tables WHERE table_schema = '" + dbnamec + "'");
|
||||
seti.last();
|
||||
Log.Log.debug("found " + seti.getInt(1) + " tables in db");
|
||||
if (seti.getInt(1) != 5) {
|
||||
// structure not valid
|
||||
Log.Log.info("recreating Database structure!");
|
||||
Scanner s = new Scanner(getClass().getResourceAsStream("/db.sql"));
|
||||
s.useDelimiter("(;(\r)?\n)|(--\n)");
|
||||
Statement st = null;
|
||||
@ -180,8 +180,8 @@ public class JDBC {
|
||||
} else {
|
||||
Log.Log.message("found valid database structure!");
|
||||
}
|
||||
} catch (SQLException throwables) {
|
||||
throwables.printStackTrace();
|
||||
} catch (SQLException e) {
|
||||
Log.Log.error("a unhandled SQLexception occured at db structure creation.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user