diff options
Diffstat (limited to 'lib/private')
-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); + } } |