Added `paused` parameter to DraftData PATCH endpoint for draft pause/resume functionality.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Set CACHE_ENABLED=false to disable caching without stopping Redis
- Defaults to true (caching enabled)
- Useful for draft periods requiring real-time data
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add optional salary_cap (REAL/float) column to team table
- Create migration file for PostgreSQL schema change
- Update Peewee model with FloatField(null=True)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Added default order_by(Team.id.asc()) to get_teams endpoint to ensure
consistent ordering of results.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Initial version: 2.1.2
This file tracks the current version for Docker builds. When building
and pushing new versions, this file will be updated and the commit
will be tagged with the version number.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Exclude 'creator' nested object from model_dump when creating custom commands.
The issue was that Pydantic was including both creator_id and creator fields,
causing Peewee to receive a nested dict that resulted in NULL creator_id values
in the database insert, violating the NOT NULL constraint.
This fix ensures only creator_id is passed to the ORM for foreign key mapping.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Fix unsafe dict access in PUT endpoint roster cache invalidation
- Add roster cache invalidation to PATCH, POST, and DELETE endpoints
- Use wildcard pattern to invalidate all roster caches since:
* Team IDs may change in PUT/PATCH operations
* Multiple teams affected in bulk POST operations
* Ensures stale roster data is never served
This ensures team rosters are immediately updated when players are
added, removed, or transferred between teams.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Use pg_dump --clean to drop existing objects before recreating them,
ensuring a cleaner sync without conflicts from existing objects.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add sort parameter support (player, team, wpa, repri, pa, newest/oldest)
- Add pagination with page_num and limit
- Ensure minimum limit of 1 to prevent errors
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Update CLAUDE.md to reflect PostgreSQL-only architecture
- Add table_name Meta class to CustomCommand models for PostgreSQL
- Remove SQLite-specific LIKE queries, use PostgreSQL ILIKE
- Refactor custom command creator info handling
- Add helper functions for database operations
- Fix creator data serialization in execute endpoint
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add cache invalidation to PUT, PATCH, POST, and DELETE endpoints
- Invalidate all player list, search, and detail caches on data changes
- Increase cache TTLs now that invalidation ensures accuracy:
- GET /players: 10min → 30min
- GET /players/search: 5min → 15min
- GET /players/{player_id}: 10min → 30min
This ensures users see updated player data immediately after changes
while benefiting from longer cache lifetimes for read operations.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Major database enhancement implementing fast-querying season batting stats:
Database Schema:
- Created seasonbattingstats table with composite primary key (player_id, season)
- All batting stats (counting + calculated): pa, ab, avg, obp, slg, ops, woba, etc.
- Proper foreign key constraints and performance indexes
- Production-ready SQL creation script included
Selective Update System:
- update_season_batting_stats() function with PostgreSQL upsert logic
- Triggers on game PATCH operations to update affected player stats
- Recalculates complete season stats from stratplay data
- Efficient updates of only players who participated in modified games
API Enhancements:
- Enhanced SeasonBattingStats.get_top_hitters() with full filtering support
- New /api/v3/views/season-stats/batting/refresh endpoint for season rebuilds
- Updated views endpoint to use centralized get_top_hitters() method
- Support for team, player, min PA, and pagination filtering
Infrastructure:
- Production database sync Docker service with SSH automation
- Comprehensive error handling and logging throughout
- Fixed Peewee model to match actual table structure (no auto-id)
- Updated CLAUDE.md with dev server info and sync commands
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add CustomCommandCreator and CustomCommand models to db_engine.py
- Add comprehensive custom commands API router with full CRUD operations
- Include migration script for transferring 140 commands from sba_is_fun.db
- Add FastAPI integration for /api/v3/custom_commands endpoints
- Implement usage tracking, search, autocomplete, and statistics features
- Add grace period handling for unused commands to prevent deletion
- Include comprehensive documentation for migration process
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>