added some message outputs, edited libs in register html

This commit is contained in:
Lukas Heiligenbrunner
2020-04-17 18:11:23 +02:00
parent f4fbce7977
commit 3a51b08de8
2 changed files with 11 additions and 13 deletions

View File

@ -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.");
}
}
}