From: Philipp Date: Sun, 12 Feb 2023 15:44:56 +0000 (+0100) Subject: manually check and create the Config table before running the update X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=4dc164a5a157ffccb80485248f5d04d219dc688c;p=friendica.git manually check and create the Config table before running the update --- diff --git a/src/Core/Update.php b/src/Core/Update.php index 0f0484b4e7..a4c5cf313e 100644 --- a/src/Core/Update.php +++ b/src/Core/Update.php @@ -129,22 +129,30 @@ class Update DI::lock()->release('dbupdate', true); } + if (!DBStructure::existsTable('config')) { + DBA::e(<<get('system', 'build'); if (empty($build)) { - // legacy option - check if the Config table exists - if (DBStructure::existsTable('config')) { - $dbConfig = DBA::selectFirst('config', ['v'], ['cat' => 'system', 'k' => 'build']); - if (!empty($dbConfig)) { - $build = $dbConfig['v']; - } + $dbConfig = DBA::selectFirst('config', ['v'], ['cat' => 'system', 'k' => 'build']); + if (!empty($dbConfig)) { + $build = $dbConfig['v']; } if (empty($build) || ($build > DB_UPDATE_VERSION)) { - // legacy option - check if the Config table exists - if (DBStructure::existsTable('config')) { - DI::config()->set('system', 'build', DB_UPDATE_VERSION - 1); - } + DI::config()->set('system', 'build', DB_UPDATE_VERSION - 1); $build = DB_UPDATE_VERSION - 1; } }