Skip to content

Commit e924444

Browse files
committed
Add call to fixPostGroupIds function see BT#12609
1 parent bb93300 commit e924444

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/Chash/Command/Installation/UpgradeCommand.php

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,9 @@ protected function execute(InputInterface $input, OutputInterface $output)
387387
$runFixIds = true;
388388
}
389389

390-
if (isset($versionInfo['require_update']) && $versionInfo['require_update'] == true) {
390+
if (isset($versionInfo['require_update']) &&
391+
$versionInfo['require_update'] == true
392+
) {
391393
$output->writeln("----------------------------------------------------------------");
392394
$output->writeln("<comment>Starting migration from version: </comment><info>$currentVersion</info><comment> to version </comment><info>$versionItem ");
393395
$output->writeln("");
@@ -404,6 +406,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
404406
$runFixIds,
405407
$onlyUpdateDatabase
406408
);
409+
407410
$currentVersion = $versionItem;
408411
$output->writeln("<comment>End database migration</comment>");
409412
$output->writeln("----------------------------------------------------------------");
@@ -657,6 +660,12 @@ public function startMigration(
657660
require_once $this->getRootSys().'/src/Chamilo/CoreBundle/Entity/ExtraField.php';
658661
require_once $this->getRootSys().'/src/Chamilo/CoreBundle/Entity/ExtraFieldOptions.php';
659662
fixIds($em);
663+
664+
if (method_exists('fixPostGroupIds') &&
665+
$versionInfo['migrations_yml'] == 'V111.yml'
666+
) {
667+
fixPostGroupIds($conn);
668+
}
660669
}
661670
} catch (\Exception $e) {
662671
$output->write(sprintf('<error>Migration failed. Error %s</error>', $e->getMessage()));

0 commit comments

Comments
 (0)