Commit Graph

23 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
a5e6788289 Hash updates for marketplace transactions 2023-09-12 21:06:38 -05:00
Cal Corum
4b7f3e5d13 Update main.py
Added pitching stats
2023-09-12 13:25:34 -05:00
Cal Corum
cfcd51beb3 Added /plays/batting 2023-09-09 15:59:31 -05:00
Cal Corum
2be7955e89 Consolidated scouting db preparation 2023-09-07 13:14:53 -05:00
Cal Corum
b445957e3c Update main.py 2023-06-21 10:07:42 -05:00
Cal Corum
a7bfcaaff1 Implement dupes flag in GET /cards 2023-05-03 13:29:03 -05:00
Cal Corum
5f150ebe5a Update main.py
Stop saving paperdex entries for AI and Gauntlet teams
2023-05-02 13:56:46 -05:00
Cal Corum
90098eb60c Update main.py 2023-04-30 22:41:18 -05:00
Cal Corum
2dc12d352e Update main.py
season 5 update; switch POST /players to PUT /players
2023-04-25 01:44:37 -05:00
Cal Corum
8b7c81f197 /players return HTTP 200 on empty player query 2023-04-12 18:01:04 -05:00
Cal Corum
7bd66b791b Add POST /cards/wipe-team 2023-03-30 10:55:48 -05:00
Cal Corum
bd4af6e7fa Gauntlet Reward query update 2023-03-28 20:54:56 -05:00
Cal Corum
c30539650b Update main.py 2023-03-25 00:05:06 -05:00
Cal Corum
15d48372db Update main.py 2023-03-23 11:29:48 -05:00
Cal Corum
1c689d3194 Gauntlets functional 2023-03-20 01:45:14 -05:00
Cal Corum
12e1988322 Added GauntletRun and GauntletReward 2023-03-14 00:46:29 -05:00
Cal Corum
35aae7fcc1 Update main.py
add players/random customization, fixed /packs team_id bug
2023-03-11 17:59:57 -06:00
Cal Corum
8d0b359e85 Pack Type addition
add pack_team and pack_cardset fields
2023-03-06 13:29:19 -06:00
Cal Corum
f3e3dfc480 Fixed POST /cardsets bug 2023-02-23 23:49:38 -06:00
Cal Corum
fe88e517eb Update logging location 2023-02-21 15:58:15 -06:00
Cal Corum
f004c58f63
Initial commit 2023-02-19 21:41:23 -06:00