Skip to content

Commit

Permalink
Fixed saving of decimals in remote sql servers not working correctly (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
OmerBenGera committed Apr 1, 2022
1 parent 2a2d0d4 commit 12c0d86
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
Expand Up @@ -237,6 +237,10 @@ private void createIslandsTable() {
new Pair<>("mob_drops_multiplier", "DECIMAL")
);

SQLHelper.modifyColumnType("islands_settings", "crop_growth_multiplier", "DECIMAL");
SQLHelper.modifyColumnType("islands_settings", "spawner_rates_multiplier", "DECIMAL");
SQLHelper.modifyColumnType("islands_settings", "mob_drops_multiplier", "DECIMAL");

SQLHelper.createTable("islands_upgrades",
new Pair<>("island", "UUID"),
new Pair<>("upgrade", "LONG_UNIQUE_TEXT"),
Expand Down
Expand Up @@ -143,6 +143,7 @@ private void executeUpdate(String statement, QueryResult<Void> queryResult) {

String query = statement
.replace("BIG_DECIMAL", "TEXT")
.replace("DECIMAL", "DECIMAL(10, 2)")
.replace("UUID", "VARCHAR(36)")
.replace("LONG_UNIQUE_TEXT", "VARCHAR(255)")
.replace("UNIQUE_TEXT", "VARCHAR(30)");
Expand Down

0 comments on commit 12c0d86

Please sign in to comment.