mirror of
https://github.com/Such-Software/wownerogue.git
synced 2026-10-17 22:31:26 +02:00
- 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.