From 7b42c59c3220310e73f546aa3b81dfcf4ebe24c2 Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Wed, 5 Feb 2025 11:31:04 -0800 Subject: [PATCH] Nix these ancient migrations. They've surely run anywhere they need to. And one of them is not guarded by an existence check and thus borks setting up a new database. --- .../com/threerings/user/RewardRepository.java | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/src/main/java/com/threerings/user/RewardRepository.java b/src/main/java/com/threerings/user/RewardRepository.java index e87fc16..c7c2744 100644 --- a/src/main/java/com/threerings/user/RewardRepository.java +++ b/src/main/java/com/threerings/user/RewardRepository.java @@ -398,10 +398,6 @@ public class RewardRepository extends JORARepository }; JDBCUtil.createTableIfMissing(conn, "REWARD_INFO", rewardInfoTable, ""); - // TEMP: (2006-12-22) add COUPON_CODE column - JDBCUtil.addColumn(conn, "REWARD_INFO", "COUPON_CODE", "VARCHAR(255)", "DESCRIPTION"); - // END TEMP - String[] rewardsTable = { "REWARD_ID INTEGER NOT NULL", "ACCOUNT VARCHAR(255)", @@ -412,17 +408,6 @@ public class RewardRepository extends JORARepository "INDEX (REDEEMER_IDENT)" }; JDBCUtil.createTableIfMissing(conn, "REWARD_RECORDS", rewardsTable, ""); - - // Add a parameter column. This allows a particular reward to be granted more than once, and - // pass specific details to the reward handler. - if (!JDBCUtil.tableContainsColumn(conn, "REWARD_RECORDS", "PARAM")) { - // unfortunately, we need to recreate the primary key - JDBCUtil.dropPrimaryKey(conn, "REWARD_RECORDS"); - - // add generic parameter column, and include - JDBCUtil.addColumn(conn, "REWARD_RECORDS", "PARAM", "VARCHAR(255), " + - "ADD PRIMARY KEY (REWARD_ID, ACCOUNT, PARAM)", null); - } } @Override