From 1be2301844db3c841c7bd2b8577144857a880883 Mon Sep 17 00:00:00 2001 From: dave Date: Tue, 13 Jul 2010 05:20:37 +0000 Subject: [PATCH] Add an oid field to confrences so we know which conferences are the same year after year.. we should probably keep the "year" column there too.. it's easier to query that than querying the config variables to find all the years taht the conference was active (needed for ceremony script and report generation) --- db/db.code.version.txt | 2 +- db/db.update.199.sql | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 db/db.update.199.sql diff --git a/db/db.code.version.txt b/db/db.code.version.txt index ca55a6c..aa34eab 100644 --- a/db/db.code.version.txt +++ b/db/db.code.version.txt @@ -1 +1 @@ -198 +199 diff --git a/db/db.update.199.sql b/db/db.update.199.sql new file mode 100644 index 0000000..fddf25e --- /dev/null +++ b/db/db.update.199.sql @@ -0,0 +1,14 @@ +-- Add an original ID to the conference, unfortunately we have no way really to distinguish conferences now, so make +-- everything the same conference... this is wrong in some testing cases, but no one will be using multiple conferences yet +ALTER TABLE `conferences` ADD `oid` INT NOT NULL AFTER `id`; +UPDATE `conferences`, (SELECT `id` FROM `conferences` ORDER BY `year` LIMIT 1) as newid SET oid=newid.id WHERE 1; + +-- user_roles.conferences_id was moved to users +ALTER TABLE `user_roles` DROP `conferences_id` ; + +-- Passwords were moved to accounts, keep username/email +-- around for now, just in case. +ALTER TABLE `users` DROP `password`; +ALTER TABLE `users` DROP `passwordset`; +ALTER TABLE `users` DROP `oldpassword`; +