-
Notifications
You must be signed in to change notification settings - Fork 2
Database Setup
yashiazize edited this page Aug 29, 2021
·
5 revisions
| Column Name | Datatype | Constraints |
|---|---|---|
| id | SERIAL PRIMARY KEY | |
| VARCHAR(100) | unique | |
| pw_hash | TEXT | not null |
| name | VARCHAR(100) | not null |
| is_chef | BOOLEAN | NOT NULL DEFAULT FALSE |
| cuisine | TEXT | not null |
| zip_code | VARCHAR(5) | not null |
| chef_img_url | INT | not null |
| Column Name | Datatype | Constraints |
|---|---|---|
| id | SERIAL PRIMARY KEY | not null |
| chef_id | INT REFERENCES users (id) | not null |
| user_id | INT REFERENCES users (id) | not null |
| status | TEXT | not null |
| cuisine | TEXT | not null |
| event_date | DATE | not null |
| start_time | TIME | not null |
| end_time | TIME | not null |
| Column Name | Datatype | Constraints |
|---|---|---|
| rating | NUMERIC NOT NULL | CHECK (rating >=0 AND rating <= 5) |
| booking_id | INT | f_key: ref (bookings.id) |