Database Schema - joshstroud/twitter-clone Wiki

Users

Column Name Data Type Details
id integer primary key
password_digest string
email string indexed, unique
handle string indexed, unique
description string
name string
created_at datetime
updated_at datetime

Tweets

Column Name Data Type Details
id integer primary key
text string
user_id integer foreign key
created_at datetime
updated_at datetime

Follows

Many-to-many joins table between followed and following users

Column Name Data Type Details
id integer primary key
user_id integer indexed, foreign key
follower_id integer indexed, foreign key
created_at datetime
updated_at datetime