From 2e17685fc26ad3c59941f0009ca1795c849a2e82 Mon Sep 17 00:00:00 2001 From: dave Date: Tue, 13 Jul 2010 03:30:05 +0000 Subject: [PATCH] More fields for hte account --- db/db.update.198.sql | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/db/db.update.198.sql b/db/db.update.198.sql index b746a0c..07e491f 100644 --- a/db/db.update.198.sql +++ b/db/db.update.198.sql @@ -34,3 +34,13 @@ DROP TABLE `users_conferences_link`; -- Add conferences ID to users ALTER TABLE `users` ADD `conferences_id` INT NOT NULL AFTER `accounts_id`; + +-- Change the (unique) index in the users table from (username,year) +-- to (accounts_id,conferences_id) +ALTER TABLE `users` DROP INDEX `username`; +ALTER TABLE `users` ADD UNIQUE (`accounts_id` , `conferences_id`); + +-- Add deleted/deleted_datetime data to the accounts table +ALTER TABLE `accounts` ADD `deleted` ENUM( 'no', 'yes' ) NOT NULL DEFAULT 'no' AFTER `superuser`; +ALTER TABLE `accounts` ADD `deleted_datetime` DATETIME NOT NULL AFTER `deleted`; +UPDATE `accounts` SET `deleted`='no';