Skip migration checks for all sql backends besides mysql, postgres and sqlite
This commit is contained in:
parent
a59f6818eb
commit
6f71419f2b
|
@ -8,7 +8,9 @@
|
||||||
|
|
||||||
namespace OC\DB;
|
namespace OC\DB;
|
||||||
|
|
||||||
|
use Doctrine\DBAL\Platforms\MySqlPlatform;
|
||||||
use Doctrine\DBAL\Platforms\OraclePlatform;
|
use Doctrine\DBAL\Platforms\OraclePlatform;
|
||||||
|
use Doctrine\DBAL\Platforms\PostgreSqlPlatform;
|
||||||
use Doctrine\DBAL\Platforms\SqlitePlatform;
|
use Doctrine\DBAL\Platforms\SqlitePlatform;
|
||||||
|
|
||||||
class MDB2SchemaManager {
|
class MDB2SchemaManager {
|
||||||
|
@ -62,8 +64,10 @@ class MDB2SchemaManager {
|
||||||
return new SQLiteMigrator($this->conn);
|
return new SQLiteMigrator($this->conn);
|
||||||
} else if ($platform instanceof OraclePlatform) {
|
} else if ($platform instanceof OraclePlatform) {
|
||||||
return new OracleMigrator($this->conn);
|
return new OracleMigrator($this->conn);
|
||||||
} else {
|
} else if ($platform instanceof MySqlPlatform or $platform instanceof PostgreSqlPlatform) {
|
||||||
return new Migrator($this->conn);
|
return new Migrator($this->conn);
|
||||||
|
} else {
|
||||||
|
return new NoCheckMigrator($this->conn);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,24 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Copyright (c) 2014 Robin Appelman <icewind@owncloud.com>
|
||||||
|
* This file is licensed under the Affero General Public License version 3 or
|
||||||
|
* later.
|
||||||
|
* See the COPYING-README file.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace OC\DB;
|
||||||
|
|
||||||
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* migrator for database platforms that don't support the upgrade check
|
||||||
|
*
|
||||||
|
* @package OC\DB
|
||||||
|
*/
|
||||||
|
class NoCheckMigrator extends Migrator {
|
||||||
|
/**
|
||||||
|
* @param \Doctrine\DBAL\Schema\Schema $targetSchema
|
||||||
|
* @throws \OC\DB\MigrationException
|
||||||
|
*/
|
||||||
|
public function checkMigrate(Schema $targetSchema) {}
|
||||||
|
}
|
|
@ -10,15 +10,7 @@ namespace OC\DB;
|
||||||
|
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
|
|
||||||
class OracleMigrator extends Migrator {
|
class OracleMigrator extends NoCheckMigrator {
|
||||||
/**
|
|
||||||
* @param \Doctrine\DBAL\Schema\Schema $targetSchema
|
|
||||||
* @throws \OC\DB\MigrationException
|
|
||||||
*
|
|
||||||
* Migration testing is skipped for oracle
|
|
||||||
*/
|
|
||||||
public function checkMigrate(Schema $targetSchema) {}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param Schema $targetSchema
|
* @param Schema $targetSchema
|
||||||
* @param \Doctrine\DBAL\Connection $connection
|
* @param \Doctrine\DBAL\Connection $connection
|
||||||
|
|
Loading…
Reference in New Issue