From 8c531ad1777beadd6933605e7630ca2681001fb3 Mon Sep 17 00:00:00 2001
From: BlueRaja <BlueRaja.admin@gmail.com>
Date: Thu, 24 Jan 2013 20:52:29 -0600
Subject: Challenges are now displayed in the correct order again.  Ay'
 carumba.

---
 db updates.sql | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

(limited to 'db updates.sql')

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
-- 
cgit v1.2.3

