Files
DarkflameServer/migrations/dlu/sqlite/83_chat_log_scope.sql
Aaron Kimbrell af54ca282f feat(db): chat log guild, team and filter result; chat flags
chat_log gets guild_id, team_id and filtered (migrations mysql 100, sqlite 83),
and the chat log queries take a time range, a guild, a team, a conversation
between two characters and paging back by id. Whispers are their own visibility
switch (includeWhispers), apart from team and guild chat (includePrivate).
Whisper partners and teams that talked are listed with counts.

chat_flags, chat_flag_messages and chat_flag_events (mysql 101, sqlite 84) hold
flagged chat with a copy of the messages around it, its status, note, linked
player report and history. Open flags are in the dashboard snapshot.

Tests on SQLite alone (dDatabaseSqliteTests) and in the MySQL parity tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 18:23:22 -05:00

8 lines
446 B
SQL

/* chat_log guild_id, team_id and filtered. See the MySQL migration. */
ALTER TABLE chat_log ADD COLUMN guild_id BIGINT NOT NULL DEFAULT 0;
ALTER TABLE chat_log ADD COLUMN team_id BIGINT NOT NULL DEFAULT 0;
ALTER TABLE chat_log ADD COLUMN filtered INTEGER NOT NULL DEFAULT 0;
UPDATE chat_log SET filtered = blocked;
CREATE INDEX IF NOT EXISTS chat_log_guild ON chat_log (guild_id);
CREATE INDEX IF NOT EXISTS chat_log_team ON chat_log (team_id);