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 <noreply@anthropic.com>
This commit is contained in:
parent
337667fc07
commit
906a3b7cdd
|
|
@ -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 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.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';
|
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 $$;
|
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,6 @@ from pydantic import BaseModel
|
||||||
from typing import Optional, List
|
from typing import Optional, List
|
||||||
from datetime import date, datetime, timedelta
|
from datetime import date, datetime, timedelta
|
||||||
from decimal import Decimal
|
from decimal import Decimal
|
||||||
import json
|
|
||||||
|
|
||||||
from db import get_db, get_cursor, r2d
|
from db import get_db, get_cursor, r2d
|
||||||
from auth import require_auth
|
from auth import require_auth
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user