paper-dynasty-database/scripts
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
..
audit_results.json PostgreSQL migration: Complete code preparation phase 2026-01-25 23:05:54 -06:00
audit_sqlite.py PostgreSQL migration: Complete code preparation phase 2026-01-25 23:05:54 -06:00
migrate_to_postgres.py Fix PostgreSQL compatibility for GROUP BY queries and aggregations 2026-01-26 21:59:25 -06:00