aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/DB/MigrationService.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/DB/MigrationService.php')
-rw-r--r--lib/private/DB/MigrationService.php9
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/private/DB/MigrationService.php b/lib/private/DB/MigrationService.php
index 19d1b240736..0a3b0d1dcc7 100644
--- a/lib/private/DB/MigrationService.php
+++ b/lib/private/DB/MigrationService.php
@@ -6,20 +6,19 @@
*/
namespace OC\DB;
-use Doctrine\DBAL\Platforms\OraclePlatform;
-use Doctrine\DBAL\Platforms\PostgreSQL94Platform;
use Doctrine\DBAL\Schema\Index;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\DBAL\Schema\SchemaException;
use Doctrine\DBAL\Schema\Sequence;
use Doctrine\DBAL\Schema\Table;
-use Doctrine\DBAL\Types\Types;
use OC\App\InfoParser;
use OC\IntegrityCheck\Helpers\AppLocator;
use OC\Migration\SimpleOutput;
use OCP\AppFramework\App;
use OCP\AppFramework\QueryException;
use OCP\DB\ISchemaWrapper;
+use OCP\DB\Types;
+use OCP\IDBConnection;
use OCP\Migration\IMigrationStep;
use OCP\Migration\IOutput;
use OCP\Server;
@@ -599,7 +598,7 @@ class MigrationService {
$indexName = strtolower($primaryKey->getName());
$isUsingDefaultName = $indexName === 'primary';
- if ($this->connection->getDatabasePlatform() instanceof PostgreSQL94Platform) {
+ if ($this->connection->getDatabaseProvider() === IDBConnection::PLATFORM_POSTGRES) {
$defaultName = $table->getName() . '_pkey';
$isUsingDefaultName = strtolower($defaultName) === $indexName;
@@ -609,7 +608,7 @@ class MigrationService {
return $sequence->getName() !== $sequenceName;
});
}
- } elseif ($this->connection->getDatabasePlatform() instanceof OraclePlatform) {
+ } elseif ($this->connection->getDatabaseProvider() === IDBConnection::PLATFORM_ORACLE) {
$defaultName = $table->getName() . '_seq';
$isUsingDefaultName = strtolower($defaultName) === $indexName;
}