From bff62c0b8fef7c97a91dccfab9e10c7001d00f9b Mon Sep 17 00:00:00 2001 From: poignatov Date: Mon, 23 Feb 2026 11:28:42 +0300 Subject: [PATCH] =?UTF-8?q?5.2.1:=20=D0=9C=D0=B8=D0=B3=D1=80=D0=B0=D1=86?= =?UTF-8?q?=D0=B8=D1=8F=20=D1=83=D0=B4=D0=B0=D0=BB=D0=B5=D0=BD=D0=B8=D1=8F?= =?UTF-8?q?=20weekly=5Fgoals.max=5Fscore?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- VERSION | 2 +- .../migrations/000022_drop_weekly_goals_max_score.down.sql | 4 ++++ .../migrations/000022_drop_weekly_goals_max_score.up.sql | 4 ++++ play-life-web/package.json | 2 +- 4 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 play-life-backend/migrations/000022_drop_weekly_goals_max_score.down.sql create mode 100644 play-life-backend/migrations/000022_drop_weekly_goals_max_score.up.sql 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",