summaryrefslogtreecommitdiffstats
path: root/core/command
diff options
context:
space:
mode:
authorAndreas Fischer <bantu@owncloud.com>2014-04-09 16:42:22 +0200
committerAndreas Fischer <bantu@owncloud.com>2014-04-09 16:42:22 +0200
commit370593361b89063d7bd65c018ccd537d0ea1c0ab (patch)
tree978ecaf49dca618d3ede5fe0a9c87ea6b1510726 /core/command
parent5ef7d69d418ef4323cc3dc93f5ec6d24315eef96 (diff)
downloadnextcloud-server-370593361b89063d7bd65c018ccd537d0ea1c0ab.tar.gz
nextcloud-server-370593361b89063d7bd65c018ccd537d0ea1c0ab.zip
Add option to create all app schemas instead of just installed app.
Diffstat (limited to 'core/command')
-rw-r--r--core/command/db/converttype.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/core/command/db/converttype.php b/core/command/db/converttype.php
index 7e0a41b1b15..f406148ebd5 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('<info>Creating schema in new database</info>');
$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');