strat-gameplay-webapp/backend/app/models
Cal Corum 8f67883be1 CLAUDE: Implement polymorphic Lineup model for PD and SBA leagues
Updated Lineup model to support both leagues using the same pattern as RosterLink:
- Made card_id nullable (PD league)
- Added player_id nullable (SBA league)
- Added XOR CHECK constraint to ensure exactly one ID is populated
- Created league-specific methods: add_pd_lineup_card() and add_sba_lineup_player()
- Replaced generic create_lineup_entry() with league-specific methods

Database migration applied to convert existing schema.

Bonus fix: Resolved Pendulum DateTime + asyncpg timezone compatibility issue
by using .naive() on all DateTime defaults in Game, Play, and GameSession models.

Updated tests to use league-specific lineup methods.
Archived migration docs and script to .claude/archive/ for reference.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-23 08:35:24 -05:00
..
__init__.py CLAUDE: Implement polymorphic RosterLink for both PD and SBA leagues 2025-10-22 22:45:44 -05:00
db_models.py CLAUDE: Implement polymorphic Lineup model for PD and SBA leagues 2025-10-23 08:35:24 -05:00
game_models.py CLAUDE: Complete Week 4 - State Management & Persistence 2025-10-22 12:01:03 -05:00
roster_models.py CLAUDE: Implement polymorphic RosterLink for both PD and SBA leagues 2025-10-22 22:45:44 -05:00