Schema - SamuelChu91/MoodTube GitHub Wiki
Preliminary schema in db/schema
Users
Column Name |
Data Type |
Details |
id |
integer |
null: false, primary key |
username |
string |
null: false, index |
email |
string |
null: false, index |
session_token |
string |
null: false, index |
password_digest |
string |
null: false |
created at |
integer |
null: false |
updated at |
integer |
null: false |
Videos
Column Name |
Data Type |
Details |
id |
integer |
null: false, primary key |
title |
string |
null: false, index |
description |
string |
null: false |
likes |
integer |
null: false |
dislikes |
integer |
null: false |
poster_id |
integer |
null: false, index |
commenter_id |
integer |
null: false, index |
created_at |
integer |
null: false |
updated_at |
integer |
null: false |
Comments
Column Name |
Data Type |
Details |
id |
integer |
null: false, primary key |
body |
string |
null: false |
author_id |
integer |
null: false, index |
video_id |
integer |
null: false, index |
created_at |
integer |
null: false |
updated_at |
integer |
null: false |
Likes
Column Name |
Data Type |
Details |
id |
integer |
null: false, primary key |
video_count |
integer |
null: false |
comment_count |
integer |
null: false |
video_id |
integer |
null: false, index |
comment_id |
integer |
null: false, index |
created_at |
integer |
null: false |
updated_at |
integer |
null: false |
Dislikes
Column Name |
Data Type |
Details |
id |
integer |
null: false, primary key |
video_count |
integer |
null: false |
comment_count |
integer |
null: false |
video_id |
integer |
null: false, index |
comment_id |
integer |
null: false, index |
created_at |
integer |
null: false |
updated_at |
integer |
null: false |