Skip to content

Commit

Permalink
Fix MySQL storage backend
Browse files Browse the repository at this point in the history
  • Loading branch information
AppleDash committed Nov 4, 2019
1 parent 2c3fcea commit c269fc1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ private void createTables() {

if (schemaVersion == 3) {
conn.prepareStatement(String.format("ALTER TABLE `%s` ADD `balance_new` TEXT", dbConn.getTable(SANEECONOMY_BALANCES))).executeUpdate();
conn.prepareStatement(String.format("UPDATE `%s` SET `balance_new` = CONVERT(TEXT, `balance`)", dbConn.getTable(SANEECONOMY_BALANCES))).executeUpdate();
conn.prepareStatement(String.format("UPDATE `%s` SET balance_new = balance", dbConn.getTable(SANEECONOMY_BALANCES))).executeUpdate();
conn.prepareStatement(String.format("ALTER TABLE `%s` DROP COLUMN `balance`", dbConn.getTable(SANEECONOMY_BALANCES))).executeUpdate();
conn.prepareStatement(String.format("ALTER TABLE `%s` CHANGE COLUMN `balance_new` `balance` TEXT", dbConn.getTable(SANEECONOMY_BALANCES))).executeUpdate();
conn.prepareStatement(String.format("REPLACE INTO %s (`key`, `val`) VALUES ('schema_version', 4)", dbConn.getTable(SANEECONOMY_SCHEMA))).executeUpdate();
Expand Down
1 change: 1 addition & 0 deletions SaneEconomyCore/src/main/resources/plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: SaneEconomy
author: AppleDash
main: org.appledash.saneeconomy.SaneEconomy
version: ${project.version}
api-version: '1.14'
load: STARTUP
softdepend: [Vault]
commands:
Expand Down

0 comments on commit c269fc1

Please sign in to comment.