aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/composer/composer/autoload_classmap.php1
-rw-r--r--lib/composer/composer/autoload_static.php1
-rw-r--r--lib/private/DB/Connection.php2
-rw-r--r--lib/private/DB/MySQLMigrator.php50
-rw-r--r--tests/lib/DB/MigratorTest.php8
5 files changed, 0 insertions, 62 deletions
diff --git a/lib/composer/composer/autoload_classmap.php b/lib/composer/composer/autoload_classmap.php
index 367385b0359..108a2f74b50 100644
--- a/lib/composer/composer/autoload_classmap.php
+++ b/lib/composer/composer/autoload_classmap.php
@@ -1194,7 +1194,6 @@ return array(
'OC\\DB\\MissingColumnInformation' => $baseDir . '/lib/private/DB/MissingColumnInformation.php',
'OC\\DB\\MissingIndexInformation' => $baseDir . '/lib/private/DB/MissingIndexInformation.php',
'OC\\DB\\MissingPrimaryKeyInformation' => $baseDir . '/lib/private/DB/MissingPrimaryKeyInformation.php',
- 'OC\\DB\\MySQLMigrator' => $baseDir . '/lib/private/DB/MySQLMigrator.php',
'OC\\DB\\MySqlTools' => $baseDir . '/lib/private/DB/MySqlTools.php',
'OC\\DB\\OCSqlitePlatform' => $baseDir . '/lib/private/DB/OCSqlitePlatform.php',
'OC\\DB\\ObjectParameter' => $baseDir . '/lib/private/DB/ObjectParameter.php',
diff --git a/lib/composer/composer/autoload_static.php b/lib/composer/composer/autoload_static.php
index bdf1cb9f5bd..ae1f13fc89b 100644
--- a/lib/composer/composer/autoload_static.php
+++ b/lib/composer/composer/autoload_static.php
@@ -1227,7 +1227,6 @@ class ComposerStaticInit749170dad3f5e7f9ca158f5a9f04f6a2
'OC\\DB\\MissingColumnInformation' => __DIR__ . '/../../..' . '/lib/private/DB/MissingColumnInformation.php',
'OC\\DB\\MissingIndexInformation' => __DIR__ . '/../../..' . '/lib/private/DB/MissingIndexInformation.php',
'OC\\DB\\MissingPrimaryKeyInformation' => __DIR__ . '/../../..' . '/lib/private/DB/MissingPrimaryKeyInformation.php',
- 'OC\\DB\\MySQLMigrator' => __DIR__ . '/../../..' . '/lib/private/DB/MySQLMigrator.php',
'OC\\DB\\MySqlTools' => __DIR__ . '/../../..' . '/lib/private/DB/MySqlTools.php',
'OC\\DB\\OCSqlitePlatform' => __DIR__ . '/../../..' . '/lib/private/DB/OCSqlitePlatform.php',
'OC\\DB\\ObjectParameter' => __DIR__ . '/../../..' . '/lib/private/DB/ObjectParameter.php',
diff --git a/lib/private/DB/Connection.php b/lib/private/DB/Connection.php
index 7d246b49c62..df35e0b5e0d 100644
--- a/lib/private/DB/Connection.php
+++ b/lib/private/DB/Connection.php
@@ -599,8 +599,6 @@ class Connection extends \Doctrine\DBAL\Connection {
return new SQLiteMigrator($this, $config, $dispatcher);
} elseif ($platform instanceof OraclePlatform) {
return new OracleMigrator($this, $config, $dispatcher);
- } elseif ($platform instanceof MySQLPlatform) {
- return new MySQLMigrator($this, $config, $dispatcher);
} else {
return new Migrator($this, $config, $dispatcher);
}
diff --git a/lib/private/DB/MySQLMigrator.php b/lib/private/DB/MySQLMigrator.php
deleted file mode 100644
index 0f8cbb309f3..00000000000
--- a/lib/private/DB/MySQLMigrator.php
+++ /dev/null
@@ -1,50 +0,0 @@
-<?php
-/**
- * @copyright Copyright (c) 2016, ownCloud, Inc.
- *
- * @author Robin Appelman <robin@icewind.nl>
- * @author Thomas Müller <thomas.mueller@tmit.eu>
- *
- * @license AGPL-3.0
- *
- * This code is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License, version 3,
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License, version 3,
- * along with this program. If not, see <http://www.gnu.org/licenses/>
- *
- */
-namespace OC\DB;
-
-use Doctrine\DBAL\Schema\Schema;
-
-class MySQLMigrator extends Migrator {
- /**
- * @param Schema $targetSchema
- * @param \Doctrine\DBAL\Connection $connection
- * @return \Doctrine\DBAL\Schema\SchemaDiff
- */
- protected function getDiff(Schema $targetSchema, \Doctrine\DBAL\Connection $connection) {
- $platform = $connection->getDatabasePlatform();
- $platform->registerDoctrineTypeMapping('enum', 'string');
- $platform->registerDoctrineTypeMapping('bit', 'string');
-
- $schemaDiff = parent::getDiff($targetSchema, $connection);
-
- // identifiers need to be quoted for mysql
- foreach ($schemaDiff->changedTables as $tableDiff) {
- $tableDiff->name = $this->connection->quoteIdentifier($tableDiff->name);
- foreach ($tableDiff->changedColumns as $column) {
- $column->oldColumnName = $this->connection->quoteIdentifier($column->oldColumnName);
- }
- }
-
- return $schemaDiff;
- }
-}
diff --git a/tests/lib/DB/MigratorTest.php b/tests/lib/DB/MigratorTest.php
index bd6f91da1aa..3e6fb66c4c2 100644
--- a/tests/lib/DB/MigratorTest.php
+++ b/tests/lib/DB/MigratorTest.php
@@ -11,13 +11,11 @@ namespace Test\DB;
use Doctrine\DBAL\Exception;
use Doctrine\DBAL\ParameterType;
-use Doctrine\DBAL\Platforms\MySQLPlatform;
use Doctrine\DBAL\Platforms\OraclePlatform;
use Doctrine\DBAL\Platforms\SqlitePlatform;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\DBAL\Schema\SchemaConfig;
use OC\DB\Migrator;
-use OC\DB\MySQLMigrator;
use OC\DB\OracleMigrator;
use OC\DB\SQLiteMigrator;
use OCP\DB\Types;
@@ -65,8 +63,6 @@ class MigratorTest extends \Test\TestCase {
return new SQLiteMigrator($this->connection, $this->config, $dispatcher);
} elseif ($platform instanceof OraclePlatform) {
return new OracleMigrator($this->connection, $this->config, $dispatcher);
- } elseif ($platform instanceof MySQLPlatform) {
- return new MySQLMigrator($this->connection, $this->config, $dispatcher);
}
return new Migrator($this->connection, $this->config, $dispatcher);
}
@@ -138,10 +134,6 @@ class MigratorTest extends \Test\TestCase {
return $this->connection->getDatabasePlatform() instanceof SqlitePlatform;
}
- private function isMySQL() {
- return $this->connection->getDatabasePlatform() instanceof MySQLPlatform;
- }
-
public function testUpgrade() {
[$startSchema, $endSchema] = $this->getDuplicateKeySchemas();
$migrator = $this->getMigrator();