Commit Graph

4 Commits

Author SHA1 Message Date
Cal Corum
3d4e5280e0 Remove deprecated legacy files and reorganize documentation
- Delete deprecated root main.py (superseded by app/main.py)
- Delete deprecated root db_engine.py (superseded by app/db_engine.py)
- Delete legacy sheets.py (Google Sheets integration, unused)
- Archive db_migrations.py and SQL migrations to .claude/archive/
- Archive POSTGRES_MIGRATION_PLAN.md to .claude/archive/
- Move active documentation to docs/ directory

This cleanup removes ~10,000 lines of deprecated code and organizes
remaining documentation for better maintainability.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-05 13:34:09 -06:00
Cal Corum
b063b73f92 Address documentation gaps from review
- Added Prerequisites section with software/infrastructure requirements
- Added pre-migration steps: stop API, password file creation
- Added PostgreSQL 15+ schema permission grant
- Added post-migration VACUUM ANALYZE step
- Added Troubleshooting section with common errors and solutions
- Added verification queries for debugging
- Added expected record counts table
- Added connection string for external tools
- Expanded checklist with pre/post sections
- Added monitoring guidance
- Clarified CRITICAL warnings about data consistency
2026-01-27 15:27:18 -06:00
Cal Corum
ea5c047b15 Update migration guide with finalized production plan
- Updated test results with final migration metrics (549,788 records)
- Documented all tested endpoints with status
- Added complete step-by-step production migration plan
- Included rollback procedures and deployment checklist
- Documented known limitations and connection details
2026-01-27 14:03:05 -06:00
Cal Corum
92fc101e38 Fix PostgreSQL compatibility for GROUP BY queries and aggregations
- Fix NULL handling for FK checks in stratplays.py: use x.field_id instead
  of x.field to avoid triggering FK lookups on potentially missing rows
- Cast boolean is_start to integer for SUM() - PostgreSQL cannot sum booleans
- Add missing GROUP BY clause to Decision aggregate query
- Add Case import for boolean-to-integer casting
- Update migration script with boolean/datetime column mappings
- Exclude legacy battingstat/pitchingstat tables from migration
- Add comprehensive POSTGRES_MIGRATION_GUIDE.md documentation

Tested: /plays/batting and /plays/pitching endpoints work with group_by=player
2026-01-26 21:59:25 -06:00