summaryrefslogtreecommitdiffstats
path: root/db updates.sql
diff options
context:
space:
mode:
Diffstat (limited to 'db updates.sql')
-rw-r--r--db updates.sql11
1 files changed, 10 insertions, 1 deletions
diff --git a/db updates.sql b/db updates.sql
index efc21ce..bb3bcb3 100644
--- a/db updates.sql
+++ b/db updates.sql
@@ -31,4 +31,13 @@ WHERE mapType = 5;
ALTER TABLE `mapOfTheDay` CHANGE `mapExpireTime` `mapExpireTime` DATETIME NOT NULL;
-ALTER TABLE `mapOfTheDay` ADD INDEX ( `mapExpireTime` , `mapType` ); \ No newline at end of file
+ALTER TABLE `mapOfTheDay` ADD INDEX ( `mapExpireTime` , `mapType` );
+
+-- The new code relies on these being unique, so we'll enforce that through indices. Make sure you
+-- verify these ARE unique in the DB before adding these indices (they weren't in my test DB)
+-- Should probably run these two commands by themselves, one at a time
+ALTER TABLE `maps` ADD UNIQUE ( `challengeTier` , `challengeSuborder`);
+
+ALTER TABLE `challenges`
+DROP INDEX `mapID` ,
+ADD UNIQUE `mapID` ( `mapID` , `ordering` ); \ No newline at end of file