💎 adjust sql statements

Took 47 minutes
This commit is contained in:
Kiran Hart 2024-10-03 13:13:53 -04:00
parent e3e9194e45
commit dbbd118efc
No known key found for this signature in database
GPG Key ID: 5F36C7BC79D3EBC3
4 changed files with 5 additions and 5 deletions

View File

@ -20,7 +20,7 @@ public final class _25_BidHistoryMigration extends DataMigration {
"listing_id VARCHAR(36) NOT NULL, " +
"bidder_uuid VARCHAR(36) NOT NULL, " +
"bidder_name VARCHAR(16) NOT NULL, " +
"currency TEXT NOT NULL DEFAULT 'Vault/Vault'," +
"currency TEXT NOT NULL DEFAULT ('Vault/Vault')," +
"currency_item TEXT NULL," +
"amount TEXT NOT NULL, " +
"world TEXT NOT NULL, " +

View File

@ -15,7 +15,7 @@ public final class _26_MultiSerAndCurrencyMigration extends DataMigration {
@Override
public void migrate(Connection connection, String tablePrefix) throws SQLException {
try (Statement statement = connection.createStatement()) {
statement.execute("ALTER TABLE " + tablePrefix + "auctions ADD currency TEXT NOT NULL DEFAULT 'Vault/Vault' ");
statement.execute("ALTER TABLE " + tablePrefix + "auctions ADD currency TEXT NOT NULL DEFAULT ('Vault/Vault') ");
statement.execute("ALTER TABLE " + tablePrefix + "auctions ADD currency_item TEXT NULL");
statement.execute("ALTER TABLE " + tablePrefix + "auctions ADD listed_server TEXT NULL");
}

View File

@ -16,7 +16,7 @@ public final class _27_FixMigration25to26Migration extends DataMigration {
public void migrate(Connection connection, String tablePrefix) throws SQLException {
try (Statement statement = connection.createStatement()) {
statement.execute("ALTER TABLE " + tablePrefix + "auctions DROP COLUMN currency");
statement.execute("ALTER TABLE " + tablePrefix + "auctions ADD currency VARCHAR(70) DEFAULT 'Vault/Vault'");
statement.execute("ALTER TABLE " + tablePrefix + "auctions ADD currency VARCHAR(70) DEFAULT ('Vault/Vault')");
statement.execute("DROP TABLE " + tablePrefix + "bids;");
statement.execute("CREATE TABLE " + tablePrefix + "bids (" +
@ -24,7 +24,7 @@ public final class _27_FixMigration25to26Migration extends DataMigration {
"listing_id VARCHAR(36) NOT NULL, " +
"bidder_uuid VARCHAR(36) NOT NULL, " +
"bidder_name VARCHAR(16) NOT NULL, " +
"currency VARCHAR(70) NOT NULL DEFAULT 'Vault/Vault'," +
"currency VARCHAR(70) NOT NULL DEFAULT ('Vault/Vault)'," +
"currency_item TEXT NULL," +
"amount DOUBLE NOT NULL, " +
"world VARCHAR(126) NOT NULL, " +

View File

@ -15,7 +15,7 @@ public final class _29_PaymentMultiCurrencyMigration extends DataMigration {
@Override
public void migrate(Connection connection, String tablePrefix) throws SQLException {
try (Statement statement = connection.createStatement()) {
statement.execute("ALTER TABLE " + tablePrefix + "payments ADD currency TEXT NOT NULL DEFAULT 'Vault/Vault' ");
statement.execute("ALTER TABLE " + tablePrefix + "payments ADD currency VARCHAR(70) NOT NULL DEFAULT ('Vault/Vault') ");
statement.execute("ALTER TABLE " + tablePrefix + "payments ADD currency_item TEXT NULL");
}
}