From ca5c092e4bf992c89dd55d9b2e262dc4e2a21747 Mon Sep 17 00:00:00 2001 From: Jan-Hendrik Willms Date: Tue, 30 Apr 2024 14:48:50 +0200 Subject: don't delete global thread or automatically generated threads, re #4097 --- db/migrations/5.1.56_cleanup_blubber.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/db/migrations/5.1.56_cleanup_blubber.php b/db/migrations/5.1.56_cleanup_blubber.php index 86348bc..b870d78 100644 --- a/db/migrations/5.1.56_cleanup_blubber.php +++ b/db/migrations/5.1.56_cleanup_blubber.php @@ -16,6 +16,8 @@ return new class extends Migration LEFT JOIN `object_user_visits` AS ouv ON (bt.`thread_id` = ouv.`object_id`) WHERE bt.`external_contact` = 0 + AND bt.`thread_id` != 'global' + AND bt.`user_id` != '' AND bt.`user_id` NOT IN ( SELECT `user_id` FROM `auth_user_md5` )"; -- cgit v1.0