diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2014-07-30 11:48:10 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2014-07-30 11:48:10 +0200 |
commit | 54d5d0327134c958c1610528d737aadef4f418ff (patch) | |
tree | 1edfcdaeee5420fe64b6c0dc5e6fefb3588f47ec /lib | |
parent | 7d6221d25dd02066eadb07325fdef0581bf31771 (diff) | |
parent | 58472a2660734ceff22aa72f704938c3179d7cd1 (diff) | |
download | nextcloud-server-54d5d0327134c958c1610528d737aadef4f418ff.tar.gz nextcloud-server-54d5d0327134c958c1610528d737aadef4f418ff.zip |
Merge pull request #9888 from owncloud/mysql-tinyint-master
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); + } } |