generated from ctc-uci/npo-template-merged
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #22 from ctc-uci/7-create-events-table
Create Events Table
- Loading branch information
Showing
2 changed files
with
19 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
); |
This file was deleted.
Oops, something went wrong.