Skip to content
Snippets Groups Projects
Commit 27b72211 authored by Jan-Hendrik Willms's avatar Jan-Hendrik Willms
Browse files

don't delete global thread or automatically generated threads, re #4097

parent 118d31c8
No related branches found
No related tags found
No related merge requests found
...@@ -16,6 +16,8 @@ return new class extends Migration ...@@ -16,6 +16,8 @@ return new class extends Migration
LEFT JOIN `object_user_visits` AS ouv LEFT JOIN `object_user_visits` AS ouv
ON (bt.`thread_id` = ouv.`object_id`) ON (bt.`thread_id` = ouv.`object_id`)
WHERE bt.`external_contact` = 0 WHERE bt.`external_contact` = 0
AND bt.`thread_id` != 'global'
AND bt.`user_id` != ''
AND bt.`user_id` NOT IN ( AND bt.`user_id` NOT IN (
SELECT `user_id` FROM `auth_user_md5` SELECT `user_id` FROM `auth_user_md5`
)"; )";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment