From 9823d54bb8b88adeae9d976c57dc3f366a3d4f3b Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Tue, 15 Apr 2014 17:05:31 +0200 Subject: [PATCH] Use a variable for the DBMS tyoe we are converting to. --- core/command/db/converttype.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/core/command/db/converttype.php b/core/command/db/converttype.php index 3b405764e7..cb6c700738 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( 'Can not convert from %1$s to %1$s.', - $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( 'The --clear-schema option is not supported when converting to Oracle (oci).', - $input->getArgument('type') + $type )); return 1; }