summaryrefslogtreecommitdiffstats
path: root/db updates.sql
diff options
context:
space:
mode:
Diffstat (limited to 'db updates.sql')
-rw-r--r--db updates.sql30
1 files changed, 15 insertions, 15 deletions
diff --git a/db updates.sql b/db updates.sql
index 2e04942..1f275db 100644
--- a/db updates.sql
+++ b/db updates.sql
@@ -1,8 +1,10 @@
-- Remove 'on update CURRENT_TIMESTAMP' from dateLogin
-ALTER TABLE `users` CHANGE `dateLogin` `dateLogin` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
+ALTER TABLE `users` CHANGE `dateLogin` `dateLogin` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP;
-ALTER TABLE `mapOfTheDay` DROP INDEX `UniqueTypeDate` ,
-ADD UNIQUE `UniqueTypeDate` ( `mapDate` , `mapType` );
+ALTER TABLE `mapOfTheDay` DROP INDEX `UniqueTypeDate`;
+DELETE FROM mapOfTheDay WHERE ID IN (2224, 2334, 2443, 2469, 2328);
+DELETE FROM solutions WHERE ID = 29157;
+CREATE UNIQUE INDEX `UniqueTypeDate` ON `mapOfTheDay` ( `mapDate` , `mapType` );
ALTER TABLE `mapOfTheDay` ADD `championPointsWorth` INT NOT NULL DEFAULT '0';
@@ -19,8 +21,6 @@ ADD `totalTies` INT DEFAULT '0' NOT NULL ;
ALTER TABLE `solutions` ADD `championPointsWorth` INT DEFAULT '0' NOT NULL ,
ADD `isHighScore` TINYINT( 1 ) NOT NULL ;
-ALTER TABLE `solutions` ADD `isTiedForHighScore` BOOLEAN NOT NULL DEFAULT '0';
-
-- Add the 'mapExpireTime' column
ALTER TABLE `mapOfTheDay` ADD `mapExpireTime` DATETIME NULL DEFAULT NULL AFTER `mapDate`;
@@ -36,15 +36,6 @@ ALTER TABLE `mapOfTheDay` CHANGE `mapExpireTime` `mapExpireTime` DATETIME NOT NU
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 `challengeMaps` ADD UNIQUE ( `challengeTier` , `challengeSuborder`);
-
-ALTER TABLE `challenges`
-DROP INDEX `mapID` ,
-ADD UNIQUE `mapID` ( `mapID` , `ordering` );
-
-- Move shit from userData table to users
ALTER TABLE `users` ADD `displayColor` VARCHAR( 7 ) NOT NULL DEFAULT '#cccccc' ,
ADD `wallColor` VARCHAR( 7 ) NOT NULL DEFAULT '#666666' ,
@@ -108,4 +99,13 @@ AND (maps.name IS NULL OR maps.name = '');
ALTER TABLE `solutions` CHANGE `solution` `solution` VARCHAR( 4095 ) CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL;
-- Fix Typo
-UPDATE unlocks SET name = 'Light Diagonal Cover' WHERE name = 'Light Diagnol Cover' \ No newline at end of file
+UPDATE unlocks SET name = 'Light Diagonal Cover' WHERE name = 'Light Diagnol Cover';
+
+-- 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 `challengeMaps` ADD UNIQUE ( `challengeTier` , `challengeSuborder`);
+
+ALTER TABLE `challenges`
+DROP INDEX `mapID` ,
+ADD UNIQUE `mapID` ( `mapID` , `ordering` ); \ No newline at end of file