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.
This commit is contained in:
Michael Bayne
2025-02-05 11:31:04 -08:00
parent 84f1bc2140
commit 7b42c59c32
@@ -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