Database Schema - Joan-Buck/BadMovies-Group-Project Wiki

Users

column data type details
id integer not null, primary key, increment
email string not null, unique
username string not null, unique
hashedPassword string not null
created_at datetime not null
updated_at datetime not null

Movies

column data type details
id integer not null, primary key, increment
title string not null, unique
plot string not null
imageLink string not null
director string not null
movieRating string not null
year integer not null
duration string not null
genreId integer not null, foreignKey
created_at datetime not null
updated_at datetime not null

MyLists

column data type details
id integer not null, primary key, increment
userId integer not null, foreignKey
name string (50)
created_at datetime not null
updated_at datetime not null

MovieLists

column data type details
id integer not null, primary key, increment
movieId integer not null, foreignKey
myListId string (50)
created_at datetime not null
updated_at datetime not null

Reviews

column data type details
id integer not null, primary key
title string not null
content string not null
movieId int not null
userId int not null
created_at datetime not null
updated_at datetime not null

Ratings

column data type details
id integer not null, primary key
rating int not null
movieId int not null, foreignKey
userId int not null, foreignKey
created_at datetime not null
updated_at datetime not null

Genres

column data type details
id integer not null, primary key
name string not null, unique
created_at datetime not null
updated_at datetime not null