mirror of
https://github.com/friendica/friendica
synced 2025-04-27 08:30:10 +00:00
We now don't store in the "item" table anymore
This commit is contained in:
parent
36357e790e
commit
e1c79a41d9
7 changed files with 275 additions and 497 deletions
|
@ -23,6 +23,7 @@ namespace Friendica\Worker;
|
|||
|
||||
use Friendica\Core\Logger;
|
||||
use Friendica\Database\DBA;
|
||||
use Friendica\Database\DBStructure;
|
||||
use Friendica\Model\Photo;
|
||||
use Friendica\Model\Post;
|
||||
|
||||
|
@ -50,7 +51,9 @@ class RemoveContact {
|
|||
$items = Post::select(['item-id', 'post-user-id', 'uri-id', 'guid'], $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']]);
|
||||
if (DBStructure::existsTable('item')) {
|
||||
DBA::delete('item', ['id' => $item['item-id']]);
|
||||
}
|
||||
Post::delete(['uri-id' => $item['uri-id']]);
|
||||
Post\ThreadUser::delete(['post-user-id' => $item['post-user-id']]);
|
||||
Post\Thread::delete(['uri-id' => $item['uri-id']]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue