LibreRecipes
LibreRecipes copied to clipboard
Data model needs normalization and relational integrity.
ingredients = db.Column("ingredients", db.Text)
If you want a normalized database then Ingredients should be in a different table/tables.
categories = db.Column("categories", db.Text)
The categories most definitely should have an m-to-n relation with the recipes.
rating = db.Column("rating", db.Integer)
Who is rating the recipe and how? Shouldn't the rating be tied to the person rating it? And if so, you need to have a mapping table that contains user_id, recipe_id and rating.
image = db.Column("image", db.Text)
There can be only 1 image per recipe?
class Categories(db.Model):
What is this table doing? And why is there no relational linking between this and the Ingredients table?