From d560285569d45002a4f8ef4e8d1552a1c25fe7cd Mon Sep 17 00:00:00 2001 From: Kristen Yee Date: Sat, 18 Nov 2023 15:21:06 -0800 Subject: [PATCH] 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 +);