Wrong table name >_>

This commit is contained in:
Lukas Rieger (Blue) 2023-01-01 12:42:25 +01:00
parent 47117c2742
commit e659eb63aa
No known key found for this signature in database
GPG Key ID: 2D09EC5ED2687FF2

View File

@ -511,26 +511,30 @@ public void initialize() throws IOException {
recoveringConnection(connection -> {
// delete potential files that are already in the new format to avoid constraint-issues
connection.createStatement().executeUpdate(
"DELETE FROM `bluemap_storage_meta`" +
"WHERE `key` IN('settings.json', 'textures.json', '.rstate')"
executeUpdate(connection,
"DELETE FROM `bluemap_map_meta`" +
"WHERE `key` IN (?, ?, ?)",
"settings.json", "textures.json", ".rstate"
);
// rename files
connection.createStatement().executeUpdate(
"UPDATE `bluemap_storage_meta`" +
"SET `key` = 'settings.json'" +
"WHERE `key` = 'settings'"
executeUpdate(connection,
"UPDATE `bluemap_map_meta` " +
"SET `key` = ? " +
"WHERE `key` = ?",
"settings.json", "settings"
);
connection.createStatement().executeUpdate(
"UPDATE `bluemap_storage_meta`" +
"SET `key` = 'textures.json'" +
"WHERE `key` = 'textures'"
executeUpdate(connection,
"UPDATE `bluemap_map_meta` " +
"SET `key` = ? " +
"WHERE `key` = ?",
"textures.json", "textures"
);
connection.createStatement().executeUpdate(
"UPDATE `bluemap_storage_meta`" +
"SET `key` = '.rstate'" +
"WHERE `key` = 'render_state'"
executeUpdate(connection,
"UPDATE `bluemap_map_meta` " +
"SET `key` = ? " +
"WHERE `key` = ?",
".rstate", "render_state"
);
// update schemaVersion