Add user dashboard and per-user food item ownership

Introduces a user dashboard route and template, moving dashboard logic to a user blueprint. FoodItem now has an owner_id field and a unique constraint on (barcode, owner_id), with relationships set up in the User model. Updates food item creation to associate with the current user, and adds a utility script for dropping a temporary table.
This commit is contained in:
2025-06-29 11:24:34 +02:00
parent 36b189c689
commit 970d102831
7 changed files with 98 additions and 7 deletions

View File

@@ -10,6 +10,7 @@ with app.app_context():
db.session.add(
FoodItem(
name="AH Matcha cookie",
owner_id=0,
energy=430,
fats=19,
carbs=59,