Idempotent PostgreSQL migration extracted directly from paperdynasty_dev
on 2026-03-23. Replaces PR #84 which had schema drift.
Creates evolution_track, evolution_card_state, evolution_tier_boost,
evolution_cosmetic, batting_season_stats, pitching_season_stats.
Adds card.variant, battingcard.image_url, pitchingcard.image_url.
All DDL uses CREATE TABLE IF NOT EXISTS and ADD COLUMN IF NOT EXISTS.
Wrapped in a single transaction.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Remove card_1..card_26 FK columns from Roster ORM model
- Add RosterSlot model with (roster, slot, card) and a unique index on (roster, slot)
- Activate get_cards() helper on Roster using the new junction table
- Register RosterSlot in create_tables for SQLite dev environments
- Add migrations/migrate_roster_junction_table.py to backfill existing data
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Creates scout_opportunity and scout_claim tables with foreign keys,
unique constraint on (opportunity, team), and expires_at index.
Already applied to dev database.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add SQL migration script to update all franchise values
- Change AI roster queries from Team.lname to Team.sname
- Add FRANCHISE_NORMALIZE helper for bulk imports
- Update St Louis Cardinals hardcoded fix
Enables cross-era player matching for AI rosters (fixes Oakland Athletics issue)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>