diff options
author | Joas Schilling <coding@schilljs.com> | 2021-05-26 10:54:14 +0200 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2021-05-26 10:54:14 +0200 |
commit | dfedd83f79c7033ad64b953e96c738b20344dc68 (patch) | |
tree | 447bd458aebc0e67bb492d9565cd6886beb30b6b | |
parent | 903b99bd9310c7255d4ea339c79a52a779f1a7cc (diff) | |
download | nextcloud-server-dfedd83f79c7033ad64b953e96c738b20344dc68.tar.gz nextcloud-server-dfedd83f79c7033ad64b953e96c738b20344dc68.zip |
Remove the migration commands unless in debug mode
Signed-off-by: Joas Schilling <coding@schilljs.com>
-rw-r--r-- | core/register_command.php | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/core/register_command.php b/core/register_command.php index 8242e0d4971..b066c360c9b 100644 --- a/core/register_command.php +++ b/core/register_command.php @@ -109,10 +109,13 @@ if (\OC::$server->getConfig()->getSystemValue('installed', false)) { $application->add(new OC\Core\Command\Db\AddMissingIndices(\OC::$server->get(\OC\DB\Connection::class), \OC::$server->getEventDispatcher())); $application->add(new OC\Core\Command\Db\AddMissingColumns(\OC::$server->get(\OC\DB\Connection::class), \OC::$server->getEventDispatcher())); $application->add(new OC\Core\Command\Db\AddMissingPrimaryKeys(\OC::$server->get(\OC\DB\Connection::class), \OC::$server->getEventDispatcher())); - $application->add(new OC\Core\Command\Db\Migrations\StatusCommand(\OC::$server->get(\OC\DB\Connection::class))); - $application->add(new OC\Core\Command\Db\Migrations\MigrateCommand(\OC::$server->get(\OC\DB\Connection::class))); - $application->add(new OC\Core\Command\Db\Migrations\GenerateCommand(\OC::$server->get(\OC\DB\Connection::class), \OC::$server->getAppManager())); - $application->add(new OC\Core\Command\Db\Migrations\ExecuteCommand(\OC::$server->get(\OC\DB\Connection::class), \OC::$server->getConfig())); + + if (\OC::$server->getConfig()->getSystemValueBool('debug', false)) { + $application->add(new OC\Core\Command\Db\Migrations\StatusCommand(\OC::$server->get(\OC\DB\Connection::class))); + $application->add(new OC\Core\Command\Db\Migrations\MigrateCommand(\OC::$server->get(\OC\DB\Connection::class))); + $application->add(new OC\Core\Command\Db\Migrations\GenerateCommand(\OC::$server->get(\OC\DB\Connection::class), \OC::$server->getAppManager())); + $application->add(new OC\Core\Command\Db\Migrations\ExecuteCommand(\OC::$server->get(\OC\DB\Connection::class), \OC::$server->getConfig())); + } $application->add(new OC\Core\Command\Encryption\Disable(\OC::$server->getConfig())); $application->add(new OC\Core\Command\Encryption\Enable(\OC::$server->getConfig(), \OC::$server->getEncryptionManager())); |