From 1f21e06d00adf5e57f4569f53227ef1fe3cb5862 Mon Sep 17 00:00:00 2001 From: james Date: Tue, 19 Apr 2005 19:22:38 +0000 Subject: [PATCH] lots more db changes --- db/db.update.4.sql | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/db/db.update.4.sql b/db/db.update.4.sql index 4f39f8d..280ddf7 100644 --- a/db/db.update.4.sql +++ b/db/db.update.4.sql @@ -7,3 +7,21 @@ CREATE TABLE `judges_timeslots` ( `year` INT NOT NULL , PRIMARY KEY ( `id` ) ); +CREATE TABLE `judges_teams_timeslots_link` ( + `id` INT UNSIGNED NOT NULL AUTO_INCREMENT , + `judges_teams_id` INT UNSIGNED NOT NULL , + `judges_timeslots_id` INT UNSIGNED NOT NULL , + `year` INT UNSIGNED NOT NULL , + PRIMARY KEY ( `id` ) +); +ALTER TABLE judges_teams_timeslots_link ADD UNIQUE (judges_teams_id,judges_timeslots_id,year); +CREATE TABLE `judges_teams_timeslots_projects_link` ( + `id` INT UNSIGNED NOT NULL AUTO_INCREMENT , + `judges_teams_id` INT UNSIGNED NOT NULL , + `judges_timeslots_id` INT UNSIGNED NOT NULL , + `projects_id` INT UNSIGNED NOT NULL , + `year` INT UNSIGNED NOT NULL , + PRIMARY KEY ( `id` ) +); +ALTER TABLE `judges_teams_timeslots_projects_link` ADD UNIQUE (judges_teams_id,judges_timeslots_id,projects_id,year); +ALTER TABLE `projects` CHANGE `projectnumber` `projectnumber` VARCHAR( 16 ) DEFAULT NULL;