[api] another events endpoint

This commit is contained in:
Devin Zuczek
2026-08-24 18:17:02 -04:00
parent 0f281db32e
commit b355b6cea9
4 changed files with 106 additions and 0 deletions
@@ -0,0 +1,8 @@
-- The room_id index behind a room's event shelf (`GET /api/playerevents/v1/room/{roomId}`).
-- Owned by the `api` worker; generated from src/events-db.ts (SCHEMA_DDL) — keep in sync.
--
-- The column itself has been on the `event` table since 0006; only the index is new. The
-- club feed has had one since that migration and the room feed now reads the same way, so
-- without this a room's shelf scans every event in the database.
CREATE INDEX IF NOT EXISTS idx_event_room ON event (room_id);