mirror of
https://github.com/friendica/friendica
synced 2024-12-22 22:40:16 +00:00
Additional checks for deleting old contacts
This commit is contained in:
parent
89ac1c829b
commit
f1eb2bbfec
1 changed files with 4 additions and 0 deletions
|
@ -46,6 +46,10 @@ class RemoveUnusedContacts
|
|||
AND NOT `id` IN (SELECT `contact-id` FROM `post-user` WHERE `contact-id` = `contact`.`id`)
|
||||
AND NOT `id` IN (SELECT `cid` FROM `user-contact` WHERE `cid` = `contact`.`id`)
|
||||
AND NOT `id` IN (SELECT `cid` FROM `event` WHERE `cid` = `contact`.`id`)
|
||||
AND NOT `id` IN (SELECT `cid` FROM `group` WHERE `cid` = `contact`.`id`)
|
||||
AND NOT `id` IN (SELECT `cid` FROM `delivery-queue` WHERE `cid` = `contact`.`id`)
|
||||
AND NOT `id` IN (SELECT `author-id` FROM `mail` WHERE `author-id` = `contact`.`id`)
|
||||
AND NOT `id` IN (SELECT `contact-id` FROM `mail` WHERE `contact-id` = `contact`.`id`)
|
||||
AND NOT `id` IN (SELECT `contact-id` FROM `group_member` WHERE `contact-id` = `contact`.`id`)
|
||||
AND `created` < ?",
|
||||
0, 0, 0, Protocol::DFRN, Protocol::DIASPORA, Protocol::OSTATUS, Protocol::FEED, Protocol::MAIL, Protocol::ACTIVITYPUB, DateTimeFormat::utc('now - 365 days'), DateTimeFormat::utc('now - 30 days')];
|
||||
|
|
Loading…
Reference in a new issue