Database Schema - Breadsandwich/goodwatch GitHub Wiki
Database Schema
Shows
column name |
datatype |
details |
id |
Integer |
not null PK |
name |
String(50) |
not null, unique |
description |
String(500) |
not null |
overallRating |
Numeric(3, 2) |
------- |
watchStatus |
String |
------- |
genre |
String |
not null |
Watchlists
column name |
datatype |
details |
id |
integer |
not null, PK |
name |
varchar |
not null, unique |
userId |
integer |
not null, foreignKey |
showId |
integer |
not null, foreignKey |
userId
references Users.id
table
showId
references Shows.id
table
Reviews
column name |
datatype |
details |
id |
integer |
not null, primary key |
userId |
integer |
not null, foreign key |
showId |
integer |
not null, foreign key |
review |
text |
not null |
rating |
numeric |
not null |
userId
references Users.id
table
showId
references Shows.id
table
Users
column name |
datatype |
details |
id |
INTEGER |
not null, PK |
username |
VARCHAR |
not null 100 |
email |
VARCHAR |
not null UNIQUE 100 |
hashPassword |
VARCHAR |
not null |