Skip to content

Commit

Permalink
Fix table update and to not break on update issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Brokkonaut committed Jan 16, 2021
1 parent dde8dc8 commit e181c85
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/main/java/de/diddiz/LogBlock/Updater.java
Expand Up @@ -735,13 +735,12 @@ boolean update() {
try {
conn.setAutoCommit(true);
final Statement st = conn.createStatement();
st.execute("ALTER TABLE `" + wcfg.table + "-entities` KEY entityid (entityid)");
st.execute("ALTER TABLE `" + wcfg.table + "-entities` ADD KEY entityid (entityid)");
logblock.getLogger().info("Added index for table " + wcfg.table + "-entities");
st.close();
conn.close();
} catch (final SQLException ex) {
logblock.getLogger().log(Level.SEVERE, "[Updater] Error: ", ex);
return false;
}
}
config.set("version", "1.16.0");
Expand Down

0 comments on commit e181c85

Please sign in to comment.