Database Schema - melendezmatt/Rushipes GitHub Wiki

users
| column name |
data type |
details |
| id |
integer |
not null, primary key |
| username |
string(50) |
not null, unique |
| email |
string(50) |
not null, unique |
| hashedPassword |
string |
not null |
pantries
| column name |
data type |
details |
| id |
integer |
not null, primary key |
| user_id |
integer |
not null, foreign key |
| pantry_name |
string(40) |
not null |
| pantry_image_url |
string(255) |
not null |
| location |
string(255) |
not null |
| about |
string(500) |
not null |
user_id references users.id
recipes
| column name |
data type |
details |
| id |
integer |
not null, primary key |
| user_id |
integer |
not null, foreign key |
| recipe_name |
string(40) |
not null |
| recipe_image_url |
string(255) |
not null |
| about |
string(500) |
not null |
| instructions |
string(500) |
not null |
| prep_time |
integer |
not null |
| cook_time |
integer |
not null |
| servings |
integer |
not null |
| type |
integer |
not null |
user_id references users.id
ingredients
| column name |
data type |
details |
| id |
integer |
not null, primary key |
| recipe_id |
integer |
foreign key |
| pantry_id |
integer |
foreign key |
| ingredient_name |
string(255) |
not null |
| ingredient_image_url |
string(255) |
not null |
| description |
string(255) |
not null |
| calories |
integer |
not null |
| protein |
integer |
not null |
| sugar |
integer |
not null |
| amount |
integer |
not null |
recipe_id references recipe.id
pantry_id references pantries.id