Commit Graph

5 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
127c4fca65 Fix PostgreSQL timestamp conversion for POST/PATCH endpoints
Convert milliseconds timestamps from Discord bot to datetime objects
for PostgreSQL DateTimeField columns in notifications, packs, paperdex,
and rewards routers. Also fix rewards GET created_after filter.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 22:37:31 -06:00
Cal Corum
3fa7e47880 Allow resetting choice packs 2023-10-24 18:32:15 -05:00
Cal Corum
4a7a8ad397 Import cleanup 2023-09-14 22:11:31 -05:00
Cal Corum
6325698a10 Added cardsets, packs, packtypes, players 2023-09-13 16:19:56 -05:00