paper-dynasty-database/migrations
Cal Corum 0b5d0b474b feat: add GET /api/v2/refractor/cards list endpoint (#172)
Closes #172

- New GET /api/v2/refractor/cards endpoint in refractor router with
  team_id (required), card_type, tier, season, progress, limit, offset filters
- season filter uses EXISTS subquery against batting/pitching_season_stats
- progress=close filter uses CASE expression to compare current_value
  against next tier threshold (>= 80%)
- LEFT JOIN on Player so deleted players return player_name: null
- Sorting: current_tier DESC, current_value DESC
- count reflects total matching rows before pagination
- Extended _build_card_state_response() with progress_pct (computed) and
  optional player_name; single-card endpoint gains progress_pct automatically
- Added non-unique team_id index on refractor_card_state in db_engine.py
- Migration: 2026-03-25_add_refractor_card_state_team_index.sql
- Removed pre-existing unused RefractorTrack import in evaluate_game (ruff)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-25 01:35:18 -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
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