forked from smogon/pokemon-showdown
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Modlog: Support logging to a SQLite database (smogon#7513)
* Modlog: Support logging to a SQLite database Co-authored-by: Christopher Monsanto <chris@monsan.to>
- Loading branch information
Showing
11 changed files
with
545 additions
and
249 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
CREATE TABLE modlog ( | ||
modlog_id INTEGER NOT NULL PRIMARY KEY, | ||
-- UNIX timestamp | ||
timestamp INTEGER NOT NULL, | ||
--- roomid OR global-roomid | ||
roomid TEXT NOT NULL, | ||
action TEXT NOT NULL, | ||
visual_roomid TEXT, | ||
action_taker_userid TEXT, | ||
userid TEXT, | ||
autoconfirmed_userid TEXT, | ||
ip TEXT, | ||
note TEXT | ||
); | ||
|
||
CREATE TABLE alts ( | ||
modlog_id INTEGER NOT NULL, | ||
userid TEXT NOT NULL, | ||
PRIMARY KEY (modlog_id, userid), | ||
FOREIGN KEY (modlog_id) REFERENCES modlog(modlog_id) | ||
) WITHOUT ROWID; | ||
|
||
PRAGMA journal_mode=WAL; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.