EspoCRM – Open Source CRM Application
PHP calendarcontactscrmcrm-platformcrm-systemcustomer-portalcustomer-supportcustomizabledocumentsemail-marketingkanbanleadsopen-sourcephpplatformsales-automationsingle-page-applicationsupport
Migrate command: Skip if same versions
Yuriicf2c182bc92d
diff --git a/application/Espo/Core/Upgrades/Migration/Runner.php b/application/Espo/Core/Upgrades/Migration/Runner.phpindex 97692cb392..0eed3cae1b 100644--- a/application/Espo/Core/Upgrades/Migration/Runner.php+++ b/application/Espo/Core/Upgrades/Migration/Runner.php@@ -56,6 +56,12 @@ class Runner$version = $this->versionDataProvider->getPreviousVersion();$targetVersion = $this->versionDataProvider->getTargetVersion();+ if ($version === $targetVersion) {+ $io->writeLine("No migrations to run.");++ return;+ }+$prepareSteps = $this->stepsProvider->getPrepare($version, $targetVersion);if ($prepareSteps !== []) {@@ -69,15 +75,13 @@ class Runner$afterSteps = $this->stepsProvider->getAfterUpgrade($version, $targetVersion);if ($afterSteps === []) {- $io->writeLine("No migrations to run.");+ $io->writeLine("No migrations to run. Updating version...");- if ($version !== $targetVersion) {- $this->updateVersion($targetVersion);- $this->dataManager->updateAppTimestamp();- $this->dataManager->rebuild();+ $this->updateVersion($targetVersion);+ $this->dataManager->updateAppTimestamp();+ $this->dataManager->rebuild();- $io->writeLine("Completed.");- }+ $io->writeLine("Completed.");return;}