From 9328d6c7bfad9e8bf158a63ae0fdee05fd9bd1f0 Mon Sep 17 00:00:00 2001 From: Carsten Schmitz Date: Thu, 8 Nov 2018 08:57:02 +0100 Subject: [PATCH] Fixed issue: Update not possible from pre 3.x versions --- application/helpers/update/updatedb_helper.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/application/helpers/update/updatedb_helper.php b/application/helpers/update/updatedb_helper.php index e37b8f3d598..b6e224e8a5e 100644 --- a/application/helpers/update/updatedb_helper.php +++ b/application/helpers/update/updatedb_helper.php @@ -2285,8 +2285,9 @@ function db_upgrade_all($iOldDBVersion, $bSilent = false) $aIdMap = []; $aDefaultSurveyMenus = LsDefaultDataSets::getSurveyMenuData(); - foreach($aDefaultSurveyMenus as $i => $aSurveymenu) { + foreach ($aDefaultSurveyMenus as $i => $aSurveymenu) { $oDB->createCommand()->delete('{{surveymenu}}', 'name=:name', [':name' => $aSurveymenu['name']]); + $oDB->createCommand()->delete('{{surveymenu}}', 'id=:id', [':id' => $aSurveymenu['id']]); $oDB->createCommand()->insert('{{surveymenu}}', $aSurveymenu); $aIdMap[$aSurveymenu['name']] = $oDB->getCommandBuilder()->getLastInsertID('{{surveymenu}}'); }