Avoid foreign key problems when deleting contacts

2022.09-rc
Michael 2021-02-05 07:44:39 +00:00
rodzic 45dedee0a2
commit 265f46692f
1 zmienionych plików z 2 dodań i 0 usunięć

Wyświetl plik

@ -52,6 +52,8 @@ class RemoveContact {
Logger::info('Delete removed contact item', ['id' => $item['id'], 'guid' => $item['guid']]);
DBA::delete('item', ['id' => $item['id']]);
Post\User::delete(['uri-id' => $item['uri-id'], 'uid' => $item['uid']]);
Post\Thread::delete(['uri-id' => $item['uri-id']]);
Post\ThreadUser::delete(['uri-id' => $item['uri-id'], 'uid' => $item['uid']]);
}
DBA::close($items);
} while (Post::exists($condition));