From b029e78212494460382d48fc79c0cbc7e5ecb6e1 Mon Sep 17 00:00:00 2001 From: Michael Date: Thu, 4 Mar 2021 00:00:24 +0000 Subject: [PATCH] Issue 9977: Check for the existance of the "item" table on postupdate --- src/Database/PostUpdate.php | 5 +++++ 1 file changed, 5 insertions(+) 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)]);