From 370593361b89063d7bd65c018ccd537d0ea1c0ab Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Wed, 9 Apr 2014 16:42:22 +0200 Subject: [PATCH] Add option to create all app schemas instead of just installed app. --- core/command/db/converttype.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/core/command/db/converttype.php b/core/command/db/converttype.php index 7e0a41b1b1..f406148ebd 100644 --- a/core/command/db/converttype.php +++ b/core/command/db/converttype.php @@ -98,6 +98,12 @@ class ConvertType extends Command { InputOption::VALUE_NONE, 'remove all tables from the destination database' ) + ->addOption( + 'all-apps', + null, + InputOption::VALUE_NONE, + 'whether to create schema for all apps instead of only installed apps' + ) ; } @@ -120,7 +126,7 @@ class ConvertType extends Command { $output->writeln('Creating schema in new database'); $schemaManager = new \OC\DB\MDB2SchemaManager($toDB); $schemaManager->createDbFromStructure(\OC::$SERVERROOT.'/db_structure.xml'); - $apps = \OC_App::getEnabledApps(); + $apps = $input->getOption('all-apps') ? \OC_App::getAllApps() : \OC_App::getEnabledApps(); foreach($apps as $app) { if(file_exists(\OC_App::getAppPath($app).'/appinfo/database.xml')) { $schemaManager->createDbFromStructure(\OC_App::getAppPath($app).'/appinfo/database.xml');