diff options
| author | Jan-Hendrik Willms <tleilax+github@gmail.com> | 2024-04-30 14:48:50 +0200 |
|---|---|---|
| committer | Jan-Hendrik Willms <tleilax+github@gmail.com> | 2024-04-30 15:13:53 +0200 |
| commit | ca5c092e4bf992c89dd55d9b2e262dc4e2a21747 (patch) | |
| tree | e796ee442cbb7dd5025f5bb5ffa40b54ff0b7d38 | |
| parent | 23be78f843a368280f9a36d747c8d5fe052763ea (diff) | |
don't delete global thread or automatically generated threads, re #4097
| -rw-r--r-- | db/migrations/5.1.56_cleanup_blubber.php | 2 |
1 files changed, 2 insertions, 0 deletions
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` )"; |
