diff options
author | Andreas Fischer <bantu@owncloud.com> | 2014-04-15 17:05:31 +0200 |
---|---|---|
committer | Andreas Fischer <bantu@owncloud.com> | 2014-04-15 17:06:13 +0200 |
commit | 9823d54bb8b88adeae9d976c57dc3f366a3d4f3b (patch) | |
tree | 567b3aed242cd438a54f862d45395243f9ee9065 /core/command | |
parent | 714343cd74af55c37c7eccb2f076013dc94db898 (diff) | |
download | nextcloud-server-9823d54bb8b88adeae9d976c57dc3f366a3d4f3b.tar.gz nextcloud-server-9823d54bb8b88adeae9d976c57dc3f366a3d4f3b.zip |
Use a variable for the DBMS tyoe we are converting to.
Diffstat (limited to 'core/command')
-rw-r--r-- | core/command/db/converttype.php | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/core/command/db/converttype.php b/core/command/db/converttype.php index 3b405764e7f..cb6c7007380 100644 --- a/core/command/db/converttype.php +++ b/core/command/db/converttype.php @@ -109,10 +109,11 @@ class ConvertType extends Command { } protected function execute(InputInterface $input, OutputInterface $output) { - if ($input->getArgument('type') === $this->config->getValue('dbtype', '')) { + $type = $input->getArgument('type'); + if ($type === $this->config->getValue('dbtype', '')) { $output->writeln(sprintf( '<error>Can not convert from %1$s to %1$s.</error>', - $input->getArgument('type') + $type )); return 1; } @@ -121,14 +122,14 @@ class ConvertType extends Command { $toDB = $this->getToDBConnection($input, $output); if ($input->getOption('clear-schema')) { - if ($input->getArgument('type') === 'oci') { + if ($type === 'oci') { // Doctrine unconditionally tries (at least in version 2.3) // to drop sequence triggers when dropping a table, even though // such triggers may not exist. This results in errors like // "ORA-04080: trigger 'OC_STORAGES_AI_PK' does not exist". $output->writeln(sprintf( '<error>The --clear-schema option is not supported when converting to Oracle (oci).</error>', - $input->getArgument('type') + $type )); return 1; } |