From d560285569d45002a4f8ef4e8d1552a1c25fe7cd Mon Sep 17 00:00:00 2001 From: Kristen Yee Date: Sat, 18 Nov 2023 15:21:06 -0800 Subject: [PATCH 1/2] created catalog table --- server/schema/catalog.sql | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 server/schema/catalog.sql diff --git a/server/schema/catalog.sql b/server/schema/catalog.sql new file mode 100644 index 0000000..1526427 --- /dev/null +++ b/server/schema/catalog.sql @@ -0,0 +1,14 @@ +CREATE TYPE event AS ENUM ('guest speaker', 'study-trip', 'workshop'); +CREATE TYPE subject AS ENUM ('life skills', 'science', 'technology', 'engineering', 'math', 'college readiness'); +CREATE TYPE year AS ENUM ('junior', 'senior', 'both'); + +DROP TABLE catalog IF EXISTS; +CREATE TABLE catalog ( + id VARCHAR(10) PRIMARY KEY, + host VARCHAR(50) NOT NULL, + title VARCHAR(50) NOT NULL, + event_type event NOT NULL, + subject subject NOT NULL, + description VARCHAR(50) NOT NULL, + year year NOT NULL +); From 19035e2f5b505a5dc879ae05878a10cd132fec02 Mon Sep 17 00:00:00 2001 From: Kristen Yee Date: Sun, 19 Nov 2023 12:18:04 -0800 Subject: [PATCH 2/2] updated drop table statement --- server/schema/catalog.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/schema/catalog.sql b/server/schema/catalog.sql index 1526427..f6f1907 100644 --- a/server/schema/catalog.sql +++ b/server/schema/catalog.sql @@ -2,7 +2,7 @@ CREATE TYPE event AS ENUM ('guest speaker', 'study-trip', 'workshop'); CREATE TYPE subject AS ENUM ('life skills', 'science', 'technology', 'engineering', 'math', 'college readiness'); CREATE TYPE year AS ENUM ('junior', 'senior', 'both'); -DROP TABLE catalog IF EXISTS; +DROP TABLE IF EXISTS catalog; CREATE TABLE catalog ( id VARCHAR(10) PRIMARY KEY, host VARCHAR(50) NOT NULL,