From d7b0c04459a6ec42a37255c38d67cea14fb60e61 Mon Sep 17 00:00:00 2001 From: BlueRaja Date: Sat, 26 Jan 2013 03:30:45 -0600 Subject: Moved usersData table to users table, added a few more columns to users (currently unused) --- db updates.sql | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'db updates.sql') diff --git a/db updates.sql b/db updates.sql index bb3bcb3..3f2c593 100644 --- a/db updates.sql +++ b/db updates.sql @@ -36,8 +36,24 @@ 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 `challengeMaps` ADD UNIQUE ( `challengeTier` , `challengeSuborder`); ALTER TABLE `challenges` DROP INDEX `mapID` , -ADD UNIQUE `mapID` ( `mapID` , `ordering` ); \ No newline at end of file +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' , +ADD `wallEmblem` VARCHAR( 64 ) NOT NULL DEFAULT 'blank.png'; + +UPDATE users, userData +SET users.displayColor = userData.displayColor, + users.wallColor = userData.wallColor, + users.wallEmblem = userData.wallEmblem +WHERE users.ID = userData.userID; + +DROP TABLE `userData`; + +ALTER TABLE `users` ADD `dateChatGaggedUntil` DATETIME NULL , +ADD `isOptedOutOfEmails` BOOLEAN NOT NULL DEFAULT '0'; \ No newline at end of file -- cgit v1.2.3