summaryrefslogtreecommitdiffstats
path: root/lib/private/db
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2014-07-25 08:46:43 +0200
committerThomas Müller <thomas.mueller@tmit.eu>2014-07-29 09:18:37 +0200
commit58472a2660734ceff22aa72f704938c3179d7cd1 (patch)
treeb8ee77ced3bb7c70704d96c57235b7eee3dc32a8 /lib/private/db
parent29a3f1e2af698d356bf52fa9ba181c2c1bf5b9a2 (diff)
downloadnextcloud-server-58472a2660734ceff22aa72f704938c3179d7cd1.tar.gz
nextcloud-server-58472a2660734ceff22aa72f704938c3179d7cd1.zip
migration test for sqlite - adding type mapping for 'tinyint unsigned'
Diffstat (limited to 'lib/private/db')
-rw-r--r--lib/private/db/sqlitemigrator.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/private/db/sqlitemigrator.php b/lib/private/db/sqlitemigrator.php
index 81bbcb567ea..94b421c5562 100644
--- a/lib/private/db/sqlitemigrator.php
+++ b/lib/private/db/sqlitemigrator.php
@@ -9,6 +9,7 @@
namespace OC\DB;
use Doctrine\DBAL\DBALException;
+use Doctrine\DBAL\Schema\Schema;
class SQLiteMigrator extends Migrator {
@@ -61,4 +62,16 @@ class SQLiteMigrator extends Migrator {
$tmpFile = uniqid("oc_");
return "$dataDir/$tmpFile.db";
}
+
+ /**
+ * @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('tinyint unsigned', 'integer');
+
+ return parent::getDiff($targetSchema, $connection);
+ }
}