diff options
author | Morris Jobke <hey@morrisjobke.de> | 2015-03-12 10:06:21 +0100 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2015-03-12 10:06:21 +0100 |
commit | 89e1b920cc31591f6f5e3ea45bea5b7f42438edc (patch) | |
tree | 757f2834294ee36d7a89321bb96a698fd2b76248 | |
parent | 454a2563bca2867fc1fce4fef80cc05ef0b74591 (diff) | |
parent | 277503209ac46d20b8c6acf5f6d1e2dd79df9afe (diff) | |
download | nextcloud-server-89e1b920cc31591f6f5e3ea45bea5b7f42438edc.tar.gz nextcloud-server-89e1b920cc31591f6f5e3ea45bea5b7f42438edc.zip |
Merge pull request #14613 from kampka/no-table-prefix
Install command should not require table prefix
-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 eecdb08e620..5ce68e9afa3 100644 --- a/core/command/maintenance/install.php +++ b/core/command/maintenance/install.php @@ -31,7 +31,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"); @@ -78,7 +78,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'); |