Database Schema - goosey-goose/CODENAME-KETCHUP GitHub Wiki

schema_map

Database Schema

users

column data type details
id integer not null, primary key
user string not null, unique
email string not null, unique
hashedPassword string (binary) not null
bio string not null
**profilePicLink string not null
createdAt datetime not null
updatedAt datetime not null

tvShows

column data type details
id integer not null, primary key
title string not null
description string not null
rating integer not null
createdAt datetime not null
updatedAt datetime not null
  • More columns will be added depending on API

watched

column data type details
id integer not null, primary key
userId integer not null
tvShowId integer not null
createdAt datetime not null
updatedAt datetime not null
  • userId references users table
  • tvShowId references tvShows table

wantToWatch

column data type details
id integer not null, primary key
userId integer not null
tvShowId integer not null
createdAt datetime not null
updatedAt datetime not null
  • userId references users table
  • tvShowId references tvShows table

reviews

column data type details
id integer not null, primary key
content string not null
numberRating integer not null
userId integer not null
tvShowId integer not null
createdAt datetime not null
updatedAt datetime not null
  • userId references users table
  • tvShowId references tvShows table

comments

column data type details
id integer not null, primary key
content string not null
userId integer not null
reviewId integer not null
createdAt datetime not null
updatedAt datetime not null
  • userId references users table
  • reviewId references reviews table

likes

column data type details
id integer not null, primary key
userId integer not null
commentId integer not null
createdAt datetime not null
updatedAt datetime not null
  • userId references users table
  • commentId references comments table