Commit Graph

26 Commits

Author SHA1 Message Date
Cal Corum
f49adf3c64 CLAUDE: Phase 2 PostgreSQL migration BREAKTHROUGH complete
🚀 MASSIVE SUCCESS: 77% of tables now migrating successfully!

Major Achievements:
- 23/30 tables successfully migrating (up from 7/30)
- ~373,000 records migrated (up from ~5,432)
- ALL schema compatibility issues resolved
- ALL NULL constraint issues resolved

Issues resolved in Phase 2:
- CONSTRAINT-CURRENT-BSTATCOUNT-001: Made nullable
- CONSTRAINT-CURRENT-PSTATCOUNT-001: Made nullable
- CONSTRAINT-TEAM-AUTO_DRAFT-001: Made nullable
- CONSTRAINT-CURRENT-BET_WEEK-001: Made nullable (bonus discovery)
- CONSTRAINT-TEAM-GMID-001: Made nullable (bonus discovery)

Major tables now working:
 current (11 records)
 team (546 records)
 player (12,232 records)
 battingstat (105,413 records)
 pitchingstat (35,281 records)
 stratgame (2,468 records)
 stratplay (192,790 records)

Remaining issues (7 tables): Foreign key dependencies and missing tables

Next: Phase 3 - Foreign key resolution for final 23% of tables

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-18 18:31:18 -05:00
Cal Corum
79a559088a CLAUDE: Phase 1 PostgreSQL migration fixes complete
- Fixed 4 critical schema issues blocking migration
- Resolved integer overflow by converting Discord IDs to strings
- Fixed VARCHAR length limits for Google Photos URLs
- Made injury_count field nullable for NULL values
- Successfully migrating 7/30 tables (5,432+ records)

Issues resolved:
- CONSTRAINT-CURRENT-INJURY_COUNT-001: Made nullable
- DATA_QUALITY-PLAYER-NAME-001: Increased VARCHAR limits to 1000
- MIGRATION_LOGIC-TEAM-INTEGER-001: Discord IDs now strings
- MIGRATION_LOGIC-DRAFTDATA-INTEGER-001: Channel IDs now strings

New issues discovered for Phase 2:
- CONSTRAINT-CURRENT-BSTATCOUNT-001: NULL stats count
- CONSTRAINT-TEAM-AUTO_DRAFT-001: NULL auto draft flag

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-18 18:09:45 -05:00
Cal Corum
57c943e340 CLAUDE: Add custom commands system with migration from legacy database
- 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>
2025-08-17 16:31:39 -05:00
Cal Corum
1d652ee5fa Added SbaPlayer table 2025-05-30 21:41:40 -05:00
Cal Corum
cd1321553e Logging updates 2024-12-16 09:03:23 -06:00
Peter
df73e49406 Improve alias naming 2024-11-16 09:12:30 -06:00
Peter
c5b546d0ed Align home_score with runs_scored for pythag record 2024-11-15 16:52:29 -06:00
Cal Corum
fae1439365 Season 9 Additions 2024-01-14 22:44:23 -06:00
Cal Corum
1fa2a207ee Update csv exports 2023-09-15 22:38:37 -05:00
Cal Corum
761a279fc8 Added complex_to_csv 2023-09-15 01:29:00 -05:00
Cal Corum
63641dafb3 Update db_engine.py
Handle count() == 0 bug
2023-09-15 00:36:22 -05:00
Cal Corum
5fae0a30df Add query_to_csv 2023-09-15 00:03:23 -05:00
Cal Corum
f6e9e6c7fd Standings updates
Added /standings/team/{id} endpoint
Fixed pythag calculation
2023-08-24 14:29:07 -05:00
Cal Corum
5110d8b497 Fix WC GB bug 2023-08-23 11:25:11 -05:00
Cal Corum
1b653943a5 Update rest_ip from int to float 2023-08-19 01:14:55 -05:00
Cal Corum
85c8b441fa Update standings calculations 2023-08-11 09:32:35 -05:00
Cal Corum
505d0a1a8a Add divisions, update standings 2023-08-05 00:28:00 -05:00
Cal Corum
cc3ff1d071 Add managers to /games 2023-07-31 00:29:04 -05:00
Cal Corum
40df835d98 /plays and /decisions
Added /plays validators for scorecard, first pass at /decisions
2023-07-29 00:13:07 -05:00
Cal Corum
5718ce1af9 /injuries fully functional 2023-07-27 23:41:57 -05:00
Cal Corum
6e299f01cb /plays fully functional 2023-07-26 13:14:30 -05:00
Cal Corum
dd027f7fa0 Added /games 2023-07-25 00:19:33 -05:00
Cal Corum
6c03eabfe3 Season 8 Draft Fixes 2023-07-24 23:04:26 -05:00
Cal Corum
8b202fad1a Added draftdata and keepers 2023-07-17 23:08:24 -05:00
Cal Corum
782804424d Fix relative package issues 2023-05-05 11:06:11 -05:00
Cal Corum
7ac8b752ec Initial commit
File structure in place
/players and /current built
2023-03-21 16:09:46 -05:00