-
Notifications
You must be signed in to change notification settings - Fork 0
Database Schema
Connor Fitch edited this page Jun 25, 2022
·
2 revisions
Column Name | Data Type | Details |
---|---|---|
id | INT | not null, primary key |
username | STRING | not null, unique, min length 3, max length 30 |
STRING | not null, unique, min length 3, max length 255 | |
hashedPassword | STRING.BINARY | not null |
imgUrl | TEXT | |
bio | TEXT | |
createdAt | DATE | not null |
updatedAt | DATE | not null |
Column Name | Data Type | Details |
---|---|---|
id | INT | not null, primary key |
title | STRING | not null, min length 3, max length 255 |
description | TEXT | |
pdfUrl | TEXT | not null |
price | FLOAT | not null, min 0.01, max 9.99 |
forSale | BOOLEAN | default true |
userId | INT | not null, foreign key |
createdAt | DATE | not null |
updatedAt | DATE | not null |
-
userId
referencesUsers
Column Name | Data Type | Details |
---|---|---|
id | INT | not null, primary key |
imgUrl | TEXT | not null |
brewId | INT | not null, foreign key |
-
brewId
referencesBrews
Column Name | Data Type | Details |
---|---|---|
id | INT | not null, primary key |
rating | INT | not null, min 0, max 5 |
content | TEXT | not null |
userId | INT | not null, foreign key |
brewId | INT | not null, foreign key |
createdAt | DATE | not null |
updatedAt | DATE | not null |
-
userId
referencesUsers
-
brewId
referencesBrews
Column Name | Data Type | Details |
---|---|---|
id | INT | not null, primary key |
userId | INT | not null, foreign key |
brewId | INT | not null, foreign key |
createdAt | DATE | not null |
-
userId
referencesUsers
-
brewId
referencesBrews
Column Name | Data Type | Details |
---|---|---|
id | INT | not null, primary key |
name | STRING | not null, max length 50 |
Column Name | Data Type | Details |
---|---|---|
id | INT | not null, primary key |
brewId | INT | not null, foreign key |
tagId | INT | not null, foreign key |
createdAt | DATE | not null |
-
brewId
referencesBrews
-
tagId
referencesTags