diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2014-07-25 08:46:43 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2014-07-29 09:18:37 +0200 |
commit | 58472a2660734ceff22aa72f704938c3179d7cd1 (patch) | |
tree | b8ee77ced3bb7c70704d96c57235b7eee3dc32a8 /lib | |
parent | 29a3f1e2af698d356bf52fa9ba181c2c1bf5b9a2 (diff) | |
download | nextcloud-server-58472a2660734ceff22aa72f704938c3179d7cd1.tar.gz nextcloud-server-58472a2660734ceff22aa72f704938c3179d7cd1.zip |
migration test for sqlite - adding type mapping for 'tinyint unsigned'
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/db/sqlitemigrator.php | 13 |
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); + } } |