From bdd7b497fb17e8f61bb245daf4b32400d79dcfd3 Mon Sep 17 00:00:00 2001 From: James Ward Date: Sat, 23 Jul 2022 17:39:24 +0100 Subject: [PATCH] * Fix for db_version falling out of sync in previous versions --- src/Bootstrap.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Bootstrap.php b/src/Bootstrap.php index 6c58140..2db0b19 100644 --- a/src/Bootstrap.php +++ b/src/Bootstrap.php @@ -42,11 +42,11 @@ public function __construct() // Fix for db_version falling out of sync in previous versions if (in_array(Settings::get('db_version'), ['2.0.1', '2.0.2', '2.0.3', '2.0.4'])) { - Settings::update(['db_version' => '2.0.0']); + DatabaseUpgradeManager::getInstance()->doUpgrade(true); + } else { + // Silently run database upgrades - if there are any + DatabaseUpgradeManager::getInstance()->doUpgrade(); } - - // Silently run database upgrades - if there are any - DatabaseUpgradeManager::getInstance()->doUpgrade(); }); add_action('admin_menu', function() { $this->registerPages();