Skip to content

Commit

Permalink
remove runSchemaUpgradeCommand
Browse files Browse the repository at this point in the history
  • Loading branch information
Morgan Pichat committed Sep 26, 2023
1 parent b7c85c7 commit 90fc763
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 36 deletions.
10 changes: 0 additions & 10 deletions classes/UpgradeTools/CoreUpgrader/CoreUpgrader17.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,16 +56,6 @@ protected function initConstants()
$this->container->getSymfonyAdapter()->initAppKernel();
}

protected function upgradeDb($oldversion)
{
parent::upgradeDb($oldversion);

$commandResult = $this->container->getSymfonyAdapter()->runSchemaUpgradeCommand();
if (0 !== $commandResult['exitCode']) {
throw (new UpgradeException($this->container->getTranslator()->trans('Error upgrading Doctrine schema', [], 'Modules.Autoupgrade.Admin')))->setQuickInfos(explode("\n", $commandResult['output']));
}
}

protected function upgradeLanguage($lang)
{
$isoCode = $lang['iso_code'];
Expand Down
10 changes: 0 additions & 10 deletions classes/UpgradeTools/CoreUpgrader/CoreUpgrader80.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,16 +61,6 @@ protected function forceRemovingFiles()
}
}

protected function upgradeDb($oldversion)
{
parent::upgradeDb($oldversion);

$commandResult = $this->container->getSymfonyAdapter()->runSchemaUpgradeCommand();
if (0 !== $commandResult['exitCode']) {
throw (new UpgradeException($this->container->getTranslator()->trans('Error upgrading Doctrine schema', [], 'Modules.Autoupgrade.Admin')))->setQuickInfos(explode("\n", $commandResult['output']));
}
}

protected function upgradeLanguage($lang)
{
$isoCode = $lang['iso_code'];
Expand Down
16 changes: 0 additions & 16 deletions classes/UpgradeTools/SymfonyAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,22 +42,6 @@ public function __construct($destinationPsVersion)
$this->destinationPsVersion = $destinationPsVersion;
}

public function runSchemaUpgradeCommand()
{
if (version_compare($this->destinationPsVersion, '1.7.1.1', '>=')) {
$schemaUpgrade = new \PrestaShopBundle\Service\Database\Upgrade();
$outputCommand = 'prestashop:schema:update-without-foreign';
} else {
$schemaUpgrade = new \PrestaShopBundle\Service\Cache\Refresh();
$outputCommand = 'doctrine:schema:update';
}

$schemaUpgrade->addDoctrineSchemaUpdate();
$output = $schemaUpgrade->execute();

return $output[$outputCommand];
}

/**
* Return the AppKernel, after initialization
*
Expand Down

0 comments on commit 90fc763

Please sign in to comment.