-
Notifications
You must be signed in to change notification settings - Fork 0
Database Schema
Jonathan Bae edited this page Dec 12, 2019
·
10 revisions
column name | data type | details |
---|---|---|
id | integer | not null, primary key |
full_name | string | not null |
string | not null, indexed | |
session_token | string | not null, indexed |
password_digest | string | not null |
aboutme | text | not required, default to "" |
column name | data type | details |
---|---|---|
id | integer | not null, primary key |
name | string | not null, indexed |
description | text | not null |
column name | data type | details |
---|---|---|
id | integer | not null, primary key |
hobby_id | integer | not null, foreign key |
name | string | not null, indexed |
price | integer | not null |
deadline | string | not required |
description | text | not null |
column name | data type | details |
---|---|---|
id | integer | not null, primary key |
hobby_id | integer | not null, foreign key |
user_id | integer | not null, foreign key |
- add index to user_id and community_id and add uniqueness so a user can't subscribe to a community twice
column name | data type | details |
---|---|---|
id | integer | not null, primary key |
thing_id | integer | not null, foreign key |
user_id | integer | not null, foreign key |
- add index to user_id and product_id and add uniqueness so a user can't save a product to profile twice
column name | data type | details |
---|---|---|
id | integer | not null, primary key |
thing_id | integer | not null, foreign key |
user_id | integer | not null, foreign key |
body | text | not null |
stars | integer | not null, from 1 to 5 |