1
0
Fork 0

Merge pull request #9890 from annando/post-content

New table "post-content"
This commit is contained in:
Hypolite Petovan 2021-01-30 18:01:13 -05:00 committed by GitHub
commit 9885c1f128
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 518 additions and 527 deletions

View file

@ -55,8 +55,8 @@ class Expire
// Normally we shouldn't have orphaned data at all.
// If we do have some, then we have to check why.
Logger::log('Deleting orphaned item content - start', Logger::DEBUG);
$condition = ["NOT EXISTS (SELECT `uri-id` FROM `item` WHERE `item`.`uri-id` = `item-content`.`uri-id`)"];
DBA::delete('item-content', $condition);
$condition = ["NOT EXISTS (SELECT `uri-id` FROM `item` WHERE `item`.`uri-id` = `post-content`.`uri-id`)"];
DBA::delete('post-content', $condition);
Logger::log('Orphaned item content deleted: ' . DBA::affectedRows(), Logger::DEBUG);
// make this optional as it could have a performance impact on large sites