]> source.dussan.org Git - nextcloud-server.git/commitdiff
setting to skip migration tests by default
authorMorris Jobke <hey@morrisjobke.de>
Thu, 1 Oct 2015 12:23:25 +0000 (14:23 +0200)
committerMorris Jobke <hey@morrisjobke.de>
Wed, 3 Feb 2016 08:08:27 +0000 (09:08 +0100)
* if you install owncloud via package it is not
  possible to skip migration tests
* this also allows to disable migration tests for
  an instance by default

config/config.sample.php
core/ajax/update.php
core/command/upgrade.php

index 3f6ae4bc3ec1d0e08d7fddea70abd084732ef674..2a2af19d19a8b765cc2e8fd10f099c97d7e50c47 100644 (file)
@@ -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!
index 4d8fe19f1687826f3caf2355d08c3f81ce0c3f56..15daff4e1debdc89452162a1ac6bb660076ea822 100644 (file)
@@ -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 = [];
 
index c45984d7a309a76bfc2aa43c9df5965108f4ce56..2123efdfd3882f9128619f12e1e927cbd5023a79 100644 (file)
@@ -99,6 +99,12 @@ class Upgrade extends Command {
                $updateStepEnabled = true;
                $skip3rdPartyAppsDisable = false;
 
+               if ($this->config->getSystemValue('update.skip-migration-test', false)) {
+                       $output->writeln(
+                               '<info>"skip-migration-test" is activated via config.php</info>'
+                       );
+                       $simulateStepEnabled = false;
+               }
                if ($input->getOption('skip-migration-test')) {
                        $simulateStepEnabled = false;
                }