From 80d57918ae41199681f344c6dc36b5f2f9ba0f01 Mon Sep 17 00:00:00 2001 From: Lars Date: Fri, 27 Mar 2026 10:53:39 +0100 Subject: [PATCH] fix: Migration 027 constraint violation - health mode sum Fixed health mode calculation in focus_areas migration. Changed health_pct from 50 to 55 to ensure sum equals 100%. Before: 0+0+10+20+15+50 = 95% (constraint violation) After: 0+0+10+20+15+55 = 100% (valid) Co-Authored-By: Claude Opus 4.6 --- backend/migrations/027_focus_areas_system.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/migrations/027_focus_areas_system.sql b/backend/migrations/027_focus_areas_system.sql index c7a0eaa..aae9dd1 100644 --- a/backend/migrations/027_focus_areas_system.sql +++ b/backend/migrations/027_focus_areas_system.sql @@ -104,7 +104,7 @@ SELECT END AS flexibility_pct, CASE goal_mode - WHEN 'health' THEN 50 ELSE 0 + WHEN 'health' THEN 55 ELSE 0 END + CASE goal_mode WHEN 'endurance' THEN 20 ELSE 0