Merge pull request #9981 from annando/issue-9977

Issue 9977: Check for existance of the "item" table on postupdate
This commit is contained in:
Tobias Diekershoff 2021-03-04 10:21:06 +01:00 committed by GitHub
commit f24deebc7f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -784,6 +784,11 @@ class PostUpdate
return true;
}
if (!DBStructure::existsTable('item')) {
DI::config()->set("system", "post_update_version", 1400);
return true;
}
$condition = ["`extid` != ? AND EXISTS(SELECT `id` FROM `post-user` WHERE `uri-id` = `item`.`uri-id` AND `uid` = `item`.`uid` AND `external-id` IS NULL)", ''];
Logger::info('Start', ['rest' => DBA::count('item', $condition)]);