The item table is now completely removed

This commit is contained in:
Michael 2021-02-19 06:30:38 +00:00
parent 1b90686fcd
commit c247d5fbeb
12 changed files with 121 additions and 348 deletions

View file

@ -53,10 +53,10 @@ class RemoveContact {
}
if (DBStructure::existsTable('item')) {
do {
$items = Post::select(['item-id', 'post-user-id', 'uri-id', 'guid'], $condition, ['limit' => 100]);
$items = Post::select(['uri-id', 'guid', 'uid'], $condition, ['limit' => 100]);
while ($item = Post::fetch($items)) {
Logger::info('Delete removed contact item', ['id' => $item['item-id'], 'uri-id' => $item['uri-id'], 'guid' => $item['guid']]);
DBA::delete('item', ['id' => $item['item-id']]);
Logger::info('Delete removed contact item', ['uri-id' => $item['uri-id'], 'uid', 'guid' => $item['guid']]);
DBA::delete('item', ['uri-id' => $item['uri-id'], 'uid' => $item['uid']]);
}
DBA::close($items);
} while (Post::exists($condition));