summaryrefslogtreecommitdiffstats
path: root/core/command/db
diff options
context:
space:
mode:
authorAndreas Fischer <bantu@owncloud.com>2014-04-09 15:57:33 +0200
committerAndreas Fischer <bantu@owncloud.com>2014-04-09 15:57:33 +0200
commit5ef7d69d418ef4323cc3dc93f5ec6d24315eef96 (patch)
tree64ac27f88b85f57e26a7d6a3fe44b2fe8b2a48cf /core/command/db
parent03a3f668676486644a12261eba7e33f227ea960d (diff)
downloadnextcloud-server-5ef7d69d418ef4323cc3dc93f5ec6d24315eef96.tar.gz
nextcloud-server-5ef7d69d418ef4323cc3dc93f5ec6d24315eef96.zip
Do not attempt to covert to the same DBMS.
Diffstat (limited to 'core/command/db')
-rw-r--r--core/command/db/converttype.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/core/command/db/converttype.php b/core/command/db/converttype.php
index 7e65d1fb663..7e0a41b1b15 100644
--- a/core/command/db/converttype.php
+++ b/core/command/db/converttype.php
@@ -102,6 +102,14 @@ class ConvertType extends Command {
}
protected function execute(InputInterface $input, OutputInterface $output) {
+ if ($input->getArgument('type') === $this->config->getValue('dbtype', '')) {
+ $output->writeln(sprintf(
+ '<error>Can not convert from %1$s to %1$s.</error>',
+ $input->getArgument('type')
+ ));
+ return 1;
+ }
+
$fromDB = \OC_DB::getConnection();
$toDB = $this->getToDBConnection($input, $output);