mirror of
https://github.com/friendica/friendica
synced 2025-04-28 03:50:17 +00:00
The item table is now completely removed
This commit is contained in:
parent
1b90686fcd
commit
c247d5fbeb
12 changed files with 121 additions and 348 deletions
|
@ -45,11 +45,11 @@ class Expire
|
|||
Logger::log('Delete expired items', Logger::DEBUG);
|
||||
// physically remove anything that has been deleted for more than two months
|
||||
$condition = ["`deleted` AND `changed` < UTC_TIMESTAMP() - INTERVAL 60 DAY"];
|
||||
$rows = Post::select(['item-id', 'guid', 'uri-id', 'uid'], $condition);
|
||||
$rows = Post::select(['guid', 'uri-id', 'uid'], $condition);
|
||||
while ($row = Post::fetch($rows)) {
|
||||
Logger::info('Delete expired item', ['id' => $row['item-id'], 'guid' => $row['guid']]);
|
||||
Logger::info('Delete expired item', ['uri-id' => $row['uri-id'], 'guid' => $row['guid']]);
|
||||
if (DBStructure::existsTable('item')) {
|
||||
DBA::delete('item', ['id' => $row['item-id']]);
|
||||
DBA::delete('item', ['uri-id' => $row['uri-id'], 'uid' => $row['uid']]);
|
||||
}
|
||||
Post\User::delete(['uri-id' => $row['uri-id'], 'uid' => $row['uid']]);
|
||||
Post\ThreadUser::delete(['uri-id' => $row['uri-id'], 'uid' => $row['uid']]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue