Files
wownerogue/docs
jwinterm 34788e5810 fix: credits BIGINT, idempotent migration 010, atomic migration runner
- Migration 018 widens users.credits and credit_transactions.amount/
  balance_after from INTEGER to BIGINT (consistent with the atomic-money
  columns; removes a latent overflow risk on admin-configurable packages).
- Migration 010 rewritten with conname-guarded DO blocks so it is idempotent
  and safe to re-run / recover from a partial apply (bare ADD CONSTRAINT
  previously hard-failed on re-run and could wedge startup).
- The migration runner now applies each migration and records its ledger row
  in a single transaction, so a migration can never be applied-but-unrecorded
  (which would re-run a non-idempotent migration on the next boot).

Verified end-to-end against a throwaway Postgres database: all 18 migrations
apply cleanly, a second run skips via the ledger, credits is bigint, and the
new constraints/indexes are present. Full suite: 16 suites / 134 tests.
2026-05-31 10:07:15 -04:00
..
2026-03-01 13:56:35 -05:00