[Pkg-owncloud-commits] [owncloud] 78/258: Disable database migrations for MSSQL - scripts have to be applied manually
David Prévot
taffit at moszumanska.debian.org
Sat Oct 11 17:22:23 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 76ff7ab0078ff893c358396d5df02b67d07c55da
Author: Thomas Müller <thomas.mueller at tmit.eu>
Date: Mon Sep 15 14:26:00 2014 +0200
Disable database migrations for MSSQL - scripts have to be applied manually
---
lib/private/db/mdb2schemamanager.php | 3 +++
lib/private/db/mssqlmigrator.php | 23 +++++++++++++++++++++++
2 files changed, 26 insertions(+)
diff --git a/lib/private/db/mdb2schemamanager.php b/lib/private/db/mdb2schemamanager.php
index 91e590a..a07c421 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 0000000..28d8c6d
--- /dev/null
+++ b/lib/private/db/mssqlmigrator.php
@@ -0,0 +1,23 @@
+<?php
+/**
+ * Copyright (c) 2014 Thomas Müller <deepdiver at 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 at owncloud.com to get the required sql migration scripts to be applied.');
+ }
+
+}
--
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