diff options
author | Christian Kampka <christian@kampka.net> | 2015-02-28 21:41:33 +0100 |
---|---|---|
committer | Christian Kampka <christian@kampka.net> | 2015-03-11 21:06:25 +0100 |
commit | 277503209ac46d20b8c6acf5f6d1e2dd79df9afe (patch) | |
tree | d1f41c90e00bbd71e22ec77f4939f85a40dc8cab /core/command/maintenance | |
parent | 42f6448da239c1b716ae514a513c4985eec48ef5 (diff) | |
download | nextcloud-server-277503209ac46d20b8c6acf5f6d1e2dd79df9afe.tar.gz nextcloud-server-277503209ac46d20b8c6acf5f6d1e2dd79df9afe.zip |
Install command should not require table prefix
Diffstat (limited to 'core/command/maintenance')
-rw-r--r-- | core/command/maintenance/install.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/core/command/maintenance/install.php b/core/command/maintenance/install.php index 0b01afc20ed..71cbc3d491c 100644 --- a/core/command/maintenance/install.php +++ b/core/command/maintenance/install.php @@ -30,7 +30,7 @@ class Install extends Command { ->addOption('database-host', null, InputOption::VALUE_REQUIRED, 'Hostname of the database', 'localhost') ->addOption('database-user', null, InputOption::VALUE_REQUIRED, 'User name to connect to the database') ->addOption('database-pass', null, InputOption::VALUE_REQUIRED, 'Password of the database user') - ->addOption('database-table-prefix', null, InputOption::VALUE_REQUIRED, 'Prefix for all tables', 'oc_') + ->addOption('database-table-prefix', null, InputOption::VALUE_OPTIONAL, 'Prefix for all tables (default: oc_)', null) ->addOption('admin-user', null, InputOption::VALUE_REQUIRED, 'User name of the admin account', 'admin') ->addOption('admin-pass', null, InputOption::VALUE_REQUIRED, 'Password of the admin account') ->addOption('data-dir', null, InputOption::VALUE_REQUIRED, 'Path to data directory', \OC::$SERVERROOT."/data"); @@ -80,7 +80,11 @@ class Install extends Command { $dbPass = $input->getOption('database-pass'); $dbName = $input->getOption('database-name'); $dbHost = $input->getOption('database-host'); - $dbTablePrefix = $input->getOption('database-table-prefix'); + $dbTablePrefix = 'oc_'; + if ($input->hasParameterOption('--database-table-prefix')) { + $dbTablePrefix = (string) $input->getOption('database-table-prefix'); + $dbTablePrefix = trim($dbTablePrefix); + } $adminLogin = $input->getOption('admin-user'); $adminPassword = $input->getOption('admin-pass'); $dataDir = $input->getOption('data-dir'); |