Commit Graph

6 Commits

Author SHA1 Message Date
Cal Corum
40c512c665 Add PostgreSQL compatibility fixes for query ordering
- Add explicit ORDER BY id to all queries for consistent results across SQLite and PostgreSQL
- PostgreSQL does not guarantee row order without ORDER BY, unlike SQLite
- Skip table creation when DATABASE_TYPE=postgresql (production tables already exist)
- Fix datetime handling in notifications (PostgreSQL native datetime vs SQLite timestamp)
- Fix grouped query count() calls that don't work in PostgreSQL
- Update .gitignore to include storage/templates/ directory

This completes the PostgreSQL migration compatibility layer while maintaining
backwards compatibility with SQLite for local development.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-03 10:39:14 -06:00
Cal Corum
1f78bd188b Fix missed timestamp issues in stats POST handlers
- Fix batstats.py and pitstats.py POST handlers to convert timestamps
- Fix Pydantic model defaults from *100000 to *1000 (wrong multiplier)

Found during second-pass audit.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 22:45:15 -06:00
Cal Corum
f4aafa35e7 Fix PostgreSQL timestamp conversion for stats GET filters
Convert milliseconds to datetime for created filter in batstats.py
and pitstats.py GET endpoints.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 22:41:00 -06:00
Cal Corum
96be768ec9 Pre-Season 6 Updates 2023-10-19 23:16:47 -05:00
Cal Corum
4a7a8ad397 Import cleanup 2023-09-14 22:11:31 -05:00
Cal Corum
177ca2c585 Added results, rewards, batstats, and pitstats 2023-09-14 15:48:41 -05:00