* Extended functionalities

* Added different UIs
This commit is contained in:
2026-06-24 21:43:40 +02:00
parent 282f4864c4
commit f15bb7a916
348 changed files with 59057 additions and 498 deletions

View File

@@ -0,0 +1,25 @@
-- 008_diet_draft_meal_ingredients.sql
-- Scaled ingredient amounts per diet generator draft meal (portions applied at plan time).
-- Apply after script 006.
BEGIN;
CREATE TABLE IF NOT EXISTS diet."DietGeneratorDraftMealIngredients" (
"Id" serial PRIMARY KEY,
"DraftMealId" int NOT NULL
REFERENCES diet."DietGeneratorDraftMeals"("Id") ON DELETE CASCADE,
"SourceIngredientId" int NULL
REFERENCES diet."Ingredients"("Id") ON DELETE SET NULL,
"Name" varchar(255) NOT NULL,
"AmountGrams" numeric(8,2) NULL,
"Unit" varchar(50) NULL,
"SortOrder" int NOT NULL DEFAULT 0
);
CREATE INDEX IF NOT EXISTS "IX_DietGeneratorDraftMealIngredients_DraftMealId"
ON diet."DietGeneratorDraftMealIngredients" ("DraftMealId");
COMMENT ON TABLE diet."DietGeneratorDraftMealIngredients" IS
'Ingredient weights recalculated for the planned portion size of each draft meal.';
COMMIT;