diff options
author | Tor Andersson <tor@ccxvii.net> | 2021-11-10 01:56:14 +0100 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2021-11-10 01:56:14 +0100 |
commit | 66450e7666abdaced2347825a4b9e13bc0528251 (patch) | |
tree | 0db1595be42952232ba7789d3a4d65eb83e6898c | |
parent | 2f2047d1dc4db09a682f7bf8230d42ee5d0d32d3 (diff) | |
download | server-66450e7666abdaced2347825a4b9e13bc0528251.tar.gz |
Update purge script to purge fully deleted messages.
-rw-r--r-- | tools/purge.sh | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/purge.sh b/tools/purge.sh index 8084e03..af64787 100644 --- a/tools/purge.sh +++ b/tools/purge.sh @@ -13,4 +13,8 @@ echo "--- TIMED OUT ACTIVE GAMES ---" sqlite3 db "SELECT * FROM game_view $WHERE_TIMEOUT_ACTIVE" sqlite3 db "UPDATE games SET status = 3 $WHERE_TIMEOUT_ACTIVE" +echo "--- DELETED MESSAGES ---" +sqlite3 db "SELECT message_id, from_name, to_name, subject FROM message_view WHERE deleted_from_inbox=1 AND deleted_from_outbox=1" +sqlite3 db "DELETE FROM messages WHERE deleted_from_inbox=1 AND deleted_from_outbox=1" + sqlite3 db "DELETE FROM replay WHERE game_id < 1346" |