mirror of
https://github.com/Such-Software/wownerogue.git
synced 2026-10-17 14:21:25 +02:00
A typo in a status string (e.g. 'complete' vs 'completed') silently produced a money row no index/predicate matched, orphaning funds. - Migration 017 adds idempotent NOT VALID CHECK constraints on payments.status, payments.payment_type and payouts.status. NOT VALID enforces all new writes without failing on any pre-existing rows; conname guards make it re-runnable. - The in-code existing-payout guard in completeGame now also covers the 'processing' status (matching the unique index from migration 015), so a duplicate win can't create a second payable row while a payout is mid-flight. Full suite: 15 suites / 131 tests.