Paper Dynasty Database - PostgreSQL database service
Go to file
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
app PostgreSQL migration: Complete code preparation phase 2026-01-25 23:05:54 -06:00
migrations Normalize Player.franchise to city-agnostic values 2026-01-07 12:00:45 -06:00
scripts PostgreSQL migration: Complete code preparation phase 2026-01-25 23:05:54 -06:00
.env 2005 Live Series Updates 2025-11-08 18:25:08 -06:00
.env.example CLAUDE: Add .env.example with comprehensive configuration guide 2025-11-07 11:53:23 -06:00
.gitignore PostgreSQL migration: Complete code preparation phase 2026-01-25 23:05:54 -06:00
db_engine.py Pre-Season 6 Updates 2023-10-19 23:16:47 -05:00
db_migrations.py CLAUDE: Add PostgreSQL support and table names to models 2025-11-07 10:23:14 -06:00
DOCKER_QUICKSTART.md CLAUDE: Add docker-compose.yml and quickstart guide 2025-11-07 13:07:23 -06:00
docker-compose.yml CLAUDE: Comment out API service - prevents race condition in db_engine.py 2025-11-07 14:07:13 -06:00
Dockerfile 2005 Live Series Updates 2025-11-08 18:25:08 -06:00
LICENSE Initial commit 2023-02-19 21:38:07 -06:00
main.py PostgreSQL migration: Complete code preparation phase 2026-01-25 23:05:54 -06:00
MIGRATION_PROGRESS.md CLAUDE: Add migration progress tracking document 2025-11-07 10:54:42 -06:00
POSTGRES_MIGRATION_PLAN.md CLAUDE: Add PostgreSQL support and table names to models 2025-11-07 10:23:14 -06:00
PROJECT_PLAN.json PostgreSQL migration: Complete code preparation phase 2026-01-25 23:05:54 -06:00
QUICK_START.md CLAUDE: Add QUICK_START.md with step-by-step testing guide 2025-11-07 14:07:17 -06:00
requirements.txt Merge branch 'main' into postgres-migration 2026-01-25 22:53:35 -06:00
sheets.py Create sheets.py 2023-02-21 15:58:01 -06:00
VERSION Add VERSION file for docker build tracking 2025-11-15 09:24:25 -06:00