Skip to content
Americo edited this page Apr 2, 2018 · 23 revisions

Schema Information

users

column name data type details
id integer not null, primary key
username string not null, indexed, unique
password_digest string not null
session_token string not null, indexed, unique
first_name string not null
last_name string not null

activities

column name data type details
id integer not null, primary key
title string not null
user_id integer not null, foreign key (references users), indexed

routes

column name data type details
id integer not null, primary key
name string not null
description text not null
author_id integer not null, foreign key (references users), indexed

comments

column name data type details
id integer not null, primary key
body text not null
commenter_id integer not null, foreign key (references users), indexed
activity_id integer not null, foreign key (references activities), indexed

likes

column name data type details
id integer not null, primary key
liker_id integer not null, foreign key (references users), indexed
activity_id integer not null, foreign key (references activities), indexed

follows

column name data type details
id integer not null, primary key
follower_id integer not null, foreign key (references users), indexed
followee_id integer not null, foreign key (references users), indexed
Clone this wiki locally