From f01eaf87c01002bd435e1f48c3414b3782111dc5 Mon Sep 17 00:00:00 2001 From: flashwave Date: Fri, 2 Nov 2018 23:54:40 +0100 Subject: [PATCH] Added rule to remove stale forum tracking rows. --- misuzu.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/misuzu.php b/misuzu.php index e4682e56..676c7847 100644 --- a/misuzu.php +++ b/misuzu.php @@ -150,6 +150,14 @@ if (PHP_SAPI === 'cli') { DELETE FROM `msz_audit_log` WHERE `log_created` < NOW() - INTERVAL 1 YEAR '); + + // Delete ignored forum tracking entries + db_exec(' + DELETE tt FROM `msz_forum_topics_track` as tt + LEFT JOIN `msz_forum_topics` as t + ON t.`topic_id` = tt.`topic_id` + WHERE t.`topic_bumped` < NOW() - INTERVAL 1 MONTH + '); break; case 'migrate':