fix(data): reject stale reschedule snapshots

This commit is contained in:
2026-06-02 07:57:30 +03:00
parent 85918c1e5d
commit 1a8161027c
5 changed files with 97 additions and 5 deletions
@@ -128,6 +128,12 @@ BEGIN
WHERE s.id = NEW.id;
IF final_scheduled_at >= now() THEN
IF current_setting('transaction_isolation') <> 'read committed' THEN
RAISE EXCEPTION
'portfolio future reschedule requires read committed isolation'
USING ERRCODE = '0A000';
END IF;
PERFORM pg.id
FROM portfolio_games pg
WHERE EXISTS (