Scope live chat to the current match and save match history

This commit is contained in:
2026-10-07 00:40:20 -04:00
parent 8fcabe27fc
commit 2b8e102b86
14 changed files with 266 additions and 30 deletions
+9
View File
@@ -40,6 +40,15 @@ CREATE INDEX IF NOT EXISTS idx_leaderboard_server ON leaderboard_matches(server,
CREATE INDEX IF NOT EXISTS idx_leaderboard_started ON leaderboard_matches(started_at DESC, id DESC);
CREATE INDEX IF NOT EXISTS idx_leaderboard_map ON leaderboard_matches(game, map_key);
-- Chat follows match retention and survives deletion of the live server.
CREATE TABLE IF NOT EXISTS match_chat (
match_id INTEGER NOT NULL REFERENCES leaderboard_matches(id) ON DELETE CASCADE,
message_key TEXT NOT NULL,
occurrence INTEGER NOT NULL,
entry TEXT NOT NULL,
PRIMARY KEY (match_id, message_key, occurrence)
);
CREATE TABLE IF NOT EXISTS leaderboard_players (
game TEXT NOT NULL,
guid TEXT NOT NULL,