diff --git a/config/config.sample.php b/config/config.sample.php index 3f6ae4bc3e..2a2af19d19 100644 --- a/config/config.sample.php +++ b/config/config.sample.php @@ -1195,6 +1195,15 @@ $CONFIG = array( */ 'debug' => false, +/** + * Skips the migration test during upgrades + * + * If this is set to true the migration test are deactivated during upgrade. + * This is only recommended in installations where upgrade tests are run in + * advance with the same data on a test system. + */ +'update.skip-migration-test' => false, + /** * This entry is just here to show a warning in case somebody copied the sample * configuration. DO NOT ADD THIS SWITCH TO YOUR CONFIGURATION! diff --git a/core/ajax/update.php b/core/ajax/update.php index 4d8fe19f16..15daff4e1d 100644 --- a/core/ajax/update.php +++ b/core/ajax/update.php @@ -50,6 +50,12 @@ if (OC::checkUpgrade(false)) { \OC::$server->getIntegrityCodeChecker(), $logger ); + + if ($config->getSystemValue('update.skip-migration-test', false)) { + $eventSource->send('success', (string)$l->t('Migration tests are skipped - "update.skip-migration-test" is activated in config.php')); + $updater->setSimulateStepEnabled(false); + } + $incompatibleApps = []; $disabledThirdPartyApps = []; diff --git a/core/command/upgrade.php b/core/command/upgrade.php index c45984d7a3..2123efdfd3 100644 --- a/core/command/upgrade.php +++ b/core/command/upgrade.php @@ -99,6 +99,12 @@ class Upgrade extends Command { $updateStepEnabled = true; $skip3rdPartyAppsDisable = false; + if ($this->config->getSystemValue('update.skip-migration-test', false)) { + $output->writeln( + '"skip-migration-test" is activated via config.php' + ); + $simulateStepEnabled = false; + } if ($input->getOption('skip-migration-test')) { $simulateStepEnabled = false; }