diff --git a/VERSION b/VERSION index 91ff572..26d99a2 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -5.2.0 +5.2.1 diff --git a/play-life-backend/migrations/000022_drop_weekly_goals_max_score.down.sql b/play-life-backend/migrations/000022_drop_weekly_goals_max_score.down.sql new file mode 100644 index 0000000..5863af8 --- /dev/null +++ b/play-life-backend/migrations/000022_drop_weekly_goals_max_score.down.sql @@ -0,0 +1,4 @@ +-- Restore max_score for rollback (snapshot of goal; can be repopulated from max_goal_score) + +ALTER TABLE weekly_goals ADD COLUMN IF NOT EXISTS max_score NUMERIC(10,4); +UPDATE weekly_goals SET max_score = max_goal_score WHERE max_score IS NULL; diff --git a/play-life-backend/migrations/000022_drop_weekly_goals_max_score.up.sql b/play-life-backend/migrations/000022_drop_weekly_goals_max_score.up.sql new file mode 100644 index 0000000..974eaff --- /dev/null +++ b/play-life-backend/migrations/000022_drop_weekly_goals_max_score.up.sql @@ -0,0 +1,4 @@ +-- Migration: Drop weekly_goals.max_score if still present (e.g. prod where 000020 wasn't applied) +-- normalized_total_score in weekly_report_mv uses max_goal_score; max_score is unused. + +ALTER TABLE weekly_goals DROP COLUMN IF EXISTS max_score; diff --git a/play-life-web/package.json b/play-life-web/package.json index 0577b33..e20be6c 100644 --- a/play-life-web/package.json +++ b/play-life-web/package.json @@ -1,6 +1,6 @@ { "name": "play-life-web", - "version": "5.2.0", + "version": "5.2.1", "type": "module", "scripts": { "dev": "vite",