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 14:48:50 +0200 |
| commit | 27b722116b6e60d16a0fa4a9bd47ff2ac8487f08 (patch) | |
| tree | 4342562dbf64349e41dc43dc3a56b5a578eae3fa /db | |
| parent | 118d31c8878b5918fddd913069e57077c4aa46f2 (diff) | |
don't delete global thread or automatically generated threads, re #4097
Diffstat (limited to 'db')
| -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` )"; |
