Avoid foreign key problems when deleting contacts
This commit is contained in:
parent
45dedee0a2
commit
265f46692f
1 changed files with 2 additions and 0 deletions
|
@ -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));
|
||||
|
|
Loading…
Reference in a new issue