From 2325b638839240bf5d6d4f7e6e1f8eaa82d4d7fd Mon Sep 17 00:00:00 2001 From: Sergey Krylov Date: Wed, 28 Oct 2026 08:00:20 +0300 Subject: [PATCH] fix: reset portfolio value points inflated by double-counted cash (WealthLedger/backend#140) --- .../migration.sql | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 prisma/migrations/20261028080000_reset_inflated_portfolio_value_points/migration.sql diff --git a/prisma/migrations/20261028080000_reset_inflated_portfolio_value_points/migration.sql b/prisma/migrations/20261028080000_reset_inflated_portfolio_value_points/migration.sql new file mode 100644 index 0000000..74c1101 --- /dev/null +++ b/prisma/migrations/20261028080000_reset_inflated_portfolio_value_points/migration.sql @@ -0,0 +1,4 @@ +-- Points written before WealthLedger/backend#140 counted cash twice (cash balance +-- plus the mirroring CURRENCY position). Historical compositions and FX rates are +-- not stored, so the points cannot be recomputed exactly; history restarts here. +DELETE FROM "TbankPortfolioValuePoint";