fix: Offene Lebensmittel nach Listen-Import wieder anzeigen
Deploy Development / deploy (push) Successful in 1m1s
Build Test / pytest-backend (push) Failing after 2s
Build Test / lint-backend (push) Successful in 0s
Build Test / build-frontend (push) Successful in 27s

Unmapped ohne Kreuzjoin, Listen-GET kurz, Rebuild im Hintergrund.
Tandoor-Zugang (URL/Token) in den Einstellungen mit ausliefern.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
LarsandCursor committed 2026-09-13 10:36:08 +02:00
1 parent fa542e0fb9
commit d6838abda7
23 files changed
+786 -114

No files matched your search

@@ -0,0 +1,18 @@
-- Per-user Tandoor connection (URL + API token). Not a system-wide connector.
CREATE TABLE IF NOT EXISTS profile_tandoor_settings (
profile_id UUID PRIMARY KEY REFERENCES profiles(id) ON DELETE CASCADE,
base_url VARCHAR(300) NOT NULL,
api_token TEXT NOT NULL,
last_ok_at TIMESTAMPTZ,
last_error TEXT,
updated_at TIMESTAMPTZ NOT NULL DEFAULT NOW()
);
COMMENT ON TABLE profile_tandoor_settings IS 'Persönliche Tandoor-API (Familie); Token nie systemweit';
COMMENT ON COLUMN profile_tandoor_settings.api_token IS 'Tandoor Access Token; nur Backend, nie im JSON-Export';
DO $$
BEGIN
RAISE NOTICE 'Migration 067: profile_tandoor_settings';
END $$;
@@ -0,0 +1,19 @@
-- Migration 068: schnellere Unmapped-Liste und Listen-Nutzung
CREATE INDEX IF NOT EXISTS idx_nutrition_items_unmapped_open
ON nutrition_items (profile_id, source_name_normalized)
WHERE food_id IS NULL AND recipe_id IS NULL;
CREATE INDEX IF NOT EXISTS idx_nutrition_items_profile_recipe_date
ON nutrition_items (profile_id, recipe_id, date)
WHERE recipe_id IS NOT NULL;
COMMENT ON INDEX idx_nutrition_items_unmapped_open IS
'Tagebuchzeilen ohne Lebensmittel und ohne Liste';
COMMENT ON INDEX idx_nutrition_items_profile_recipe_date IS
'Letzte Nutzung einer Liste ohne Join über den Listennamen';
DO $$
BEGIN
RAISE NOTICE 'Migration 068: nutrition unmapped/recipe indexes';
END $$;