From 8b92d5915cbd7e7d7c1c94d010042f36a50df78d Mon Sep 17 00:00:00 2001 From: Alyssia Tan Date: Sat, 18 Nov 2023 16:15:26 -0800 Subject: [PATCH 1/3] AT - created the published schedule table --- server/schema/published_schedule.sql | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 server/schema/published_schedule.sql diff --git a/server/schema/published_schedule.sql b/server/schema/published_schedule.sql new file mode 100644 index 0000000..db496d5 --- /dev/null +++ b/server/schema/published_schedule.sql @@ -0,0 +1,16 @@ +DROP TABLE [IF EXISTS] published_schedule; + +CREATE TYPE year AS ENUM ('Junior','Senior'); + +CREATE TABLE [IF NOT EXISTS] published_schedule ( + id varchar(10) NOT NULL, + event_id varchar(10) NOT NULL, + confirmed boolean NOT NULL, + confirmed_on DATETIME NOT NULL, + start_time DATETIME NOT NULL, + end_time DATETIME NOT NULL, + cohort ENUM NOT NULL, + notes varchar(100), + FOREIGN KEY (event_id) + REFERENCES catalog (id) +); \ No newline at end of file From a49902642a6acb4dee87630f189c3aa936c7d84a Mon Sep 17 00:00:00 2001 From: Alyssia Tan Date: Sat, 18 Nov 2023 16:22:14 -0800 Subject: [PATCH 2/3] fixed enum name --- server/schema/published_schedule.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/schema/published_schedule.sql b/server/schema/published_schedule.sql index db496d5..45041ce 100644 --- a/server/schema/published_schedule.sql +++ b/server/schema/published_schedule.sql @@ -9,7 +9,7 @@ CREATE TABLE [IF NOT EXISTS] published_schedule ( confirmed_on DATETIME NOT NULL, start_time DATETIME NOT NULL, end_time DATETIME NOT NULL, - cohort ENUM NOT NULL, + cohort year NOT NULL, notes varchar(100), FOREIGN KEY (event_id) REFERENCES catalog (id) From 115534031e7bb9c47ceb5b3ef215acb9089ec8bd Mon Sep 17 00:00:00 2001 From: Alyssia Tan Date: Sat, 18 Nov 2023 19:05:21 -0800 Subject: [PATCH 3/3] removed brackets around exist conditionals --- server/schema/published_schedule.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/schema/published_schedule.sql b/server/schema/published_schedule.sql index 45041ce..b23bbbf 100644 --- a/server/schema/published_schedule.sql +++ b/server/schema/published_schedule.sql @@ -1,8 +1,8 @@ -DROP TABLE [IF EXISTS] published_schedule; +DROP TABLE IF EXISTS published_schedule; CREATE TYPE year AS ENUM ('Junior','Senior'); -CREATE TABLE [IF NOT EXISTS] published_schedule ( +CREATE TABLE IF NOT EXISTS published_schedule ( id varchar(10) NOT NULL, event_id varchar(10) NOT NULL, confirmed boolean NOT NULL,