Scope live chat to the current match and save match history
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user