Schema - SethUllman/NetClips GitHub Wiki

users

column name data type details
id integer not null, primary key
email email not null, indexed, unique
password_digest string not null
session_token string not null, indexed, unique
  • index on [:email, :session_token]
  • has_one watch_list
  • has_many movies through watch_list

movies

column name data type details
id integer not null, primary key
title string not null, indexed
year integer not null
seasons integer
director string not null
cast string not null
writers string not null
genres string not null
maturity rating string not null
description text not null
likes integer not null
watch_list_id integer
  • index on [:title]
  • belongs_to watch_list
  • has_one_attached image
  • has_one_attached video

watch_list

column name data type details
id integer not null, primary key
movie_id integer not null
user_id integer not null
  • belongs_to user
  • has_many movies