Skip to content

Commit

Permalink
Merge pull request #22 from ctc-uci/7-create-events-table
Browse files Browse the repository at this point in the history
Create Events Table
  • Loading branch information
h0ethan04 authored Dec 6, 2024
2 parents b67a977 + 4d76474 commit 148320d
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 9 deletions.
19 changes: 19 additions & 0 deletions server/db/schema/events.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
DROP TABLE IF EXISTS Events;
DROP TYPE IF EXISTS LEVEL;

CREATE TYPE LEVEL AS ENUM ('beginner', 'intermediate', 'advanced');

CREATE TABLE Events (
id SERIAL PRIMARY KEY,
location VARCHAR(256) NOT NULL,
title VARCHAR(256) NOT NULL,
description TEXT,
level LEVEL NOT NULL,
date DATE NOT NULL,
start_time TIME NOT NULL,
end_time TIME NOT NULL,
call_time TIME NOT NULL,
class_id INTEGER NOT NULL,
costume TEXT NOT NULL,
FOREIGN KEY (class_id) REFERENCES Classes(id) ON DELETE CASCADE
);
9 changes: 0 additions & 9 deletions server/db/schema/sample.sql

This file was deleted.

0 comments on commit 148320d

Please sign in to comment.