-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add users table Closes #5 and #6. * Fix workflow? * fix type issues * Collapse Zapatos generated types in PR reviews * Don't allow multiple roles --------- Co-authored-by: Anup Mantri <[email protected]>
- Loading branch information
1 parent
c2d3def
commit a2ed125
Showing
5 changed files
with
212 additions
and
52 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,2 @@ | ||
# Collapse Zapatos generated types in GitHub PR reviews | ||
schema.d.ts linguist-generated |
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 |
---|---|---|
@@ -1,6 +1,15 @@ | ||
CREATE TABLE student ( | ||
student_id SERIAL PRIMARY KEY, | ||
CREATE EXTENSION "uuid-ossp"; | ||
|
||
CREATE TABLE "user" ( | ||
user_id UUID PRIMARY KEY DEFAULT uuid_generate_v4(), | ||
first_name TEXT NOT NULL, | ||
last_name TEXT NOT NULL, | ||
birth_year INT NOT NULL | ||
role TEXT NOT NULL CHECK (role IN ('para', 'case_manager', 'admin')) | ||
); | ||
|
||
CREATE TABLE "student" ( | ||
student_id UUID PRIMARY KEY DEFAULT uuid_generate_v4(), | ||
first_name TEXT NOT NULL, | ||
last_name TEXT NOT NULL, | ||
assigned_case_manager_id UUID REFERENCES "user" (user_id) ON DELETE SET NULL | ||
); |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.