From 906a3b7cddec30345db12889e0342f14d10c3d22 Mon Sep 17 00:00:00 2001 From: Lars Date: Thu, 26 Mar 2026 16:26:48 +0100 Subject: [PATCH] fix: Migration 022 - remove invalid schema_migrations tracking The migration system tracks migrations via filename automatically. Removed manual DO block that used wrong column name (version vs filename). Also removed unused json import from goals.py. Co-Authored-By: Claude Opus 4.6 --- backend/migrations/022_goal_system.sql | 12 ------------ backend/routers/goals.py | 1 - 2 files changed, 13 deletions(-) diff --git a/backend/migrations/022_goal_system.sql b/backend/migrations/022_goal_system.sql index 5157148..925433d 100644 --- a/backend/migrations/022_goal_system.sql +++ b/backend/migrations/022_goal_system.sql @@ -133,15 +133,3 @@ CREATE INDEX IF NOT EXISTS idx_fitness_tests_date ON fitness_tests(profile_id, t COMMENT ON TABLE fitness_tests IS 'Standardized fitness tests (Cooper, step test, strength tests, etc.)'; COMMENT ON COLUMN fitness_tests.test_type IS 'cooper_12min, step_test, pushups_max, plank_max, flexibility_sit_reach, vo2max_est, strength_1rm_squat, strength_1rm_bench'; COMMENT ON COLUMN fitness_tests.norm_category IS 'Performance category based on age/gender norms'; - --- ============================================================================ --- VERSION UPDATE --- ============================================================================ - --- Track migration -DO $$ -BEGIN - IF NOT EXISTS (SELECT 1 FROM schema_migrations WHERE version = '022') THEN - INSERT INTO schema_migrations (version, applied_at) VALUES ('022', NOW()); - END IF; -END $$; diff --git a/backend/routers/goals.py b/backend/routers/goals.py index 919bec3..4cd7d49 100644 --- a/backend/routers/goals.py +++ b/backend/routers/goals.py @@ -14,7 +14,6 @@ from pydantic import BaseModel from typing import Optional, List from datetime import date, datetime, timedelta from decimal import Decimal -import json from db import get_db, get_cursor, r2d from auth import require_auth