[Pkg-owncloud-commits] [owncloud] 56/153: Pass Connection instead of AbstractSchemaManager to clearSchema().
David Prévot
taffit at moszumanska.debian.org
Tue May 27 03:05:34 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository owncloud.
commit 0a78fb49f560248bac130405dea2b6af9a813d89
Author: Andreas Fischer <bantu at owncloud.com>
Date: Tue Apr 15 18:20:36 2014 +0200
Pass Connection instead of AbstractSchemaManager to clearSchema().
---
core/command/db/converttype.php | 13 +++++--------
1 file changed, 5 insertions(+), 8 deletions(-)
diff --git a/core/command/db/converttype.php b/core/command/db/converttype.php
index 6fcaeac..4f3afb9 100644
--- a/core/command/db/converttype.php
+++ b/core/command/db/converttype.php
@@ -10,8 +10,6 @@
namespace OC\Core\Command\Db;
-use Doctrine\DBAL\Schema\AbstractSchemaManager;
-
use OC\Config;
use OC\DB\Connection;
use OC\DB\ConnectionFactory;
@@ -156,7 +154,7 @@ class ConvertType extends Command {
$toDB = $this->getToDBConnection($input, $output);
if ($input->getOption('clear-schema')) {
- $this->clearSchema($toDB->getSchemaManager(), $input, $output);
+ $this->clearSchema($toDB, $input, $output);
}
$this->createSchema($toDB, $input, $output);
@@ -214,19 +212,18 @@ class ConvertType extends Command {
return $this->connectionFactory->getConnection($type, $connectionParams);
}
- protected function clearSchema(AbstractSchemaManager $schemaManager, InputInterface $input, OutputInterface $output) {
- $toTables = $schemaManager->listTableNames();
+ protected function clearSchema(Connection $db, InputInterface $input, OutputInterface $output) {
+ $toTables = $this->getTables($db);
if (!empty($toTables)) {
$output->writeln('<info>Clearing schema in new database</info>');
}
foreach($toTables as $table) {
- $schemaManager->dropTable($table);
+ $db->getSchemaManager()->dropTable($table);
}
}
protected function getTables(Connection $db) {
- $schemaManager = $db->getSchemaManager();
- return $schemaManager->listTableNames();
+ return $db->getSchemaManager()->listTableNames();
}
protected function copyTable(Connection $fromDB, Connection $toDB, $table, InputInterface $input, OutputInterface $output) {
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git
More information about the Pkg-owncloud-commits
mailing list