-
Notifications
You must be signed in to change notification settings - Fork 1
Database Schema
trwong edited this page Nov 22, 2017
·
13 revisions
| column name | data type | details |
|---|---|---|
| id | integer | not null, primary key |
| first_name | string | not null, indexed |
| last_name | string | not null, indexed |
| string | not null, indexed, unique | |
| profile_img_url | string | |
| cover_img_url | string | |
| birthday | date | not null |
| gender | string | not null, inclusion |
| password_digest | string | not null |
| session_token | string | not null, indexed, unique |
| created_at | datetime | not null |
| updated_at | datetime | not null |
| column name | data type | details |
|---|---|---|
| id | integer | not null, primary key |
| body | text | not null |
| author_id | integer | not null, indexed, foreign key |
| recipient_id | integer | not null, indexed, foreign key |
| created_at | datetime | not null |
| updated_at | datetime | not null |
-
author_idreferencesuserswho created the post -
recipient_idreferencesuserswho wall the post was written on
| column name | data type | details |
|---|---|---|
| id | integer | not null, primary key |
| body | text | not null |
| author_id | integer | not null, indexed, foreign key |
| post_id | integer | not null, indexed, foreign key |
| created_at | datetime | not null |
| updated_at | datetime | not null |
-
author_idreferencesuserswho created the comment -
post_idreferencespostswhich received the comment
| column name | data type | details |
|---|---|---|
| id | integer | not null, primary key |
| requestor_id | integer | not null, indexed, foreign key |
| receiver_id | integer | not null, indexed, foreign key |
| status | string | not null, inclusion |
-
requestor_idreferencesuserswho sent a friend request -
receiver_idreferencesuserswho received a friend request -
statuswill be validated for inclusion onnil,pending,accepted,denied