From: Michael Date: Thu, 4 Mar 2021 00:00:24 +0000 (+0000) Subject: Issue 9977: Check for the existance of the "item" table on postupdate X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=b029e78212494460382d48fc79c0cbc7e5ecb6e1;p=friendica.git Issue 9977: Check for the existance of the "item" table on postupdate --- diff --git a/src/Database/PostUpdate.php b/src/Database/PostUpdate.php index 232ee18813..9659a862cf 100644 --- a/src/Database/PostUpdate.php +++ b/src/Database/PostUpdate.php @@ -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)]);