Commit Graph

17 Commits

Author SHA1 Message Date
Cal Corum
0cba52cea5 PostgreSQL migration: Complete code preparation phase
- Add db_helpers.py with cross-database upsert functions for SQLite/PostgreSQL
- Replace 12 on_conflict_replace() calls with PostgreSQL-compatible upserts
- Add unique indexes: StratPlay(game, play_num), Decision(game, pitcher)
- Add max_length to Team model fields (abbrev, sname, lname)
- Fix boolean comparison in teams.py (== 0/1 to == False/True)
- Create migrate_to_postgres.py with ID-preserving migration logic
- Create audit_sqlite.py for pre-migration data integrity checks
- Add PROJECT_PLAN.json for migration tracking
- Add .secrets/ to .gitignore for credentials

Audit results: 658,963 records across 29 tables, 2,390 orphaned stats (expected)

Based on Major Domo migration lessons learned (33 issues resolved there)
2026-01-25 23:05:54 -06:00
Cal Corum
09924faea5 Normalize Player.franchise to city-agnostic values
- 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>
2026-01-07 12:00:45 -06:00
Cal Corum
db0635b01d Added search endpoints 2025-10-08 14:21:44 -05:00
Cal Corum
adaa8206c8 Players bug fix 2025-05-29 22:19:34 -05:00
Cal Corum
21fe5c419a Flip image libraries due to white bar bug 2024-11-04 23:17:07 -06:00
Cal Corum
79b59bb376 MlbPlayers update
Add initial support for /mlbplayers
2024-05-13 15:37:00 -05:00
Cal Corum
60a4910735 Add image-reset call 2023-10-29 14:10:52 -05:00
Cal Corum
1a9f15b489 Clear excess logging 2023-10-27 20:05:12 -05:00
Cal Corum
c62d0fc60e Update players.py
Adding headers and moving files to sub batting and pitching directories
2023-10-26 21:45:02 -05:00
Cal Corum
96be768ec9 Pre-Season 6 Updates 2023-10-19 23:16:47 -05:00
Cal Corum
a44250803a Batting Card Generation Complete 2023-10-14 23:43:50 -05:00
Cal Corum
485a046855 First pass of real card gen 2023-10-11 00:58:30 -05:00
Cal Corum
1776df7173 Final test updates 2023-10-03 12:07:34 -05:00
Cal Corum
d4f26a6a2e Update dupe player check to use bbref_id 2023-09-25 00:19:26 -05:00
Cal Corum
89aebd441d Phase 1 card images 2023-09-24 18:59:32 -05:00
Cal Corum
8a0d094227 Scouting tables added to db 2023-09-22 01:29:35 -05:00
Cal Corum
6325698a10 Added cardsets, packs, packtypes, players 2023-09-13 16:19:56 -05:00