paper-dynasty-database/migrations
Cal Corum 4a1251a734 feat: add Refractor Phase 2 foundation — boost functions, schema, tests
Pure functions for computing boosted card ratings when a player
reaches a new Refractor tier. Batter boost applies fixed +0.5 to
four offensive columns per tier; pitcher boost uses a 1.5 TB-budget
priority algorithm. Both preserve the 108-sum invariant.

- Create refractor_boost.py with apply_batter_boost, apply_pitcher_boost,
  and compute_variant_hash (Decimal arithmetic, zero-floor truncation)
- Add RefractorBoostAudit model, Card.variant, BattingCard/PitchingCard
  image_url, RefractorCardState.variant fields to db_engine.py
- Add migration SQL for refractor_card_state.variant column and
  refractor_boost_audit table (JSONB, UNIQUE constraint, transactional)
- 26 unit tests covering 108-sum invariant, deltas, truncation, TB
  accounting, determinism, x-check protection, and variant hash behavior

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 13:39:03 -05:00
..
2026-03-04_add_scout_opportunities_claims.sql chore: add PostgreSQL migration for scout tables (#44) 2026-03-05 03:45:38 +00:00
2026-03-17_add_evolution_tables.sql feat(WP-10): pack opening hook — evolution_card_state initialization 2026-03-18 13:41:05 -05:00
2026-03-18_add_processed_game.sql feat: add ProcessedGame ledger for full idempotency in update_season_stats() (#105) 2026-03-18 01:05:31 -05:00
2026-03-23_rename_evolution_to_refractor.sql fix: complete remaining evolution→refractor renames from review 2026-03-23 14:17:03 -05:00
2026-03-25_add_refractor_card_state_team_index.sql feat: add GET /api/v2/refractor/cards list endpoint (#172) 2026-03-25 01:35:18 -05:00
2026-03-28_refractor_phase2_boost.sql feat: add Refractor Phase 2 foundation — boost functions, schema, tests 2026-03-29 13:39:03 -05:00
migrate_roster_junction_table.py fix: refactor Roster from 26 FK columns to RosterSlot junction table (#29) 2026-03-05 15:34:39 -06:00