diff options
author | Lukas Reschke <lukas@owncloud.com> | 2014-09-16 14:00:24 +0200 |
---|---|---|
committer | Lukas Reschke <lukas@owncloud.com> | 2014-09-16 14:00:24 +0200 |
commit | 261d07c95c99d60a88429a985eb64f750db0c398 (patch) | |
tree | db687b98284877fc9ec16059f54098b5c6849e66 /lib | |
parent | ba5d3fb96b7fdfee3ce2e1b2b4c0fd70af8170f4 (diff) | |
parent | d824d03fe14f7a0e6ead9da1bb5679c8be5992dd (diff) | |
download | nextcloud-server-261d07c95c99d60a88429a985eb64f750db0c398.tar.gz nextcloud-server-261d07c95c99d60a88429a985eb64f750db0c398.zip |
Merge pull request #11084 from owncloud/no-migration-for-mssql-master
Disable database migrations for MSSQL - scripts have to be applied manua...
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/db/mdb2schemamanager.php | 3 | ||||
-rw-r--r-- | lib/private/db/mssqlmigrator.php | 23 |
2 files changed, 26 insertions, 0 deletions
diff --git a/lib/private/db/mdb2schemamanager.php b/lib/private/db/mdb2schemamanager.php index 91e590a901a..a07c421b9b8 100644 --- a/lib/private/db/mdb2schemamanager.php +++ b/lib/private/db/mdb2schemamanager.php @@ -12,6 +12,7 @@ use Doctrine\DBAL\Platforms\MySqlPlatform; use Doctrine\DBAL\Platforms\OraclePlatform; use Doctrine\DBAL\Platforms\PostgreSqlPlatform; use Doctrine\DBAL\Platforms\SqlitePlatform; +use Doctrine\DBAL\Platforms\SQLServerPlatform; class MDB2SchemaManager { /** @@ -65,6 +66,8 @@ class MDB2SchemaManager { return new OracleMigrator($this->conn); } else if ($platform instanceof MySqlPlatform) { return new MySQLMigrator($this->conn); + } else if ($platform instanceof SQLServerPlatform) { + return new MsSqlMigrator($this->conn); } else if ($platform instanceof PostgreSqlPlatform) { return new Migrator($this->conn); } else { diff --git a/lib/private/db/mssqlmigrator.php b/lib/private/db/mssqlmigrator.php new file mode 100644 index 00000000000..28d8c6dc06f --- /dev/null +++ b/lib/private/db/mssqlmigrator.php @@ -0,0 +1,23 @@ +<?php +/** + * Copyright (c) 2014 Thomas Müller <deepdiver@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; + +class MsSqlMigrator extends Migrator { + + /** + * @param \Doctrine\DBAL\Schema\Schema $targetSchema + */ + public function migrate(Schema $targetSchema) { + throw new MigrationException('', + 'Database migration is required to continue operations. Please contact support@owncloud.com to get the required sql migration scripts to be applied.'); + } + +} |