Skip to content

Commit

Permalink
Fixed issue: Update not possible from pre 3.x versions
Browse files Browse the repository at this point in the history
  • Loading branch information
c-schmitz committed Nov 8, 2018
1 parent c8a4492 commit 9328d6c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion application/helpers/update/updatedb_helper.php
Expand Up @@ -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}}');
}
Expand Down

0 comments on commit 9328d6c

Please sign in to comment.