aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/DB
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2023-09-29 17:39:42 +0200
committerJoas Schilling <coding@schilljs.com>2023-10-06 15:29:27 +0200
commitccb01b19a0196b1cfd02fd004deebe63915287ac (patch)
tree642949fbe7b0943650b88069c4d129036b0951a5 /lib/private/DB
parentf8ee6c4769900736dcc0642b9f85199f7d1bd1a9 (diff)
downloadnextcloud-server-ccb01b19a0196b1cfd02fd004deebe63915287ac.tar.gz
nextcloud-server-ccb01b19a0196b1cfd02fd004deebe63915287ac.zip
fix(sqlite): Remove some old SQLite cheats
- Doctrine correctly forces integer for autoincrement by now - Doctrine correctly maintains integer types by now Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/private/DB')
-rw-r--r--lib/private/DB/SQLiteMigrator.php11
1 files changed, 0 insertions, 11 deletions
diff --git a/lib/private/DB/SQLiteMigrator.php b/lib/private/DB/SQLiteMigrator.php
index cbb39070a48..e0102e105b2 100644
--- a/lib/private/DB/SQLiteMigrator.php
+++ b/lib/private/DB/SQLiteMigrator.php
@@ -24,8 +24,6 @@
namespace OC\DB;
use Doctrine\DBAL\Schema\Schema;
-use Doctrine\DBAL\Types\BigIntType;
-use Doctrine\DBAL\Types\Type;
class SQLiteMigrator extends Migrator {
/**
@@ -34,21 +32,12 @@ class SQLiteMigrator extends Migrator {
* @return \Doctrine\DBAL\Schema\SchemaDiff
*/
protected function getDiff(Schema $targetSchema, \Doctrine\DBAL\Connection $connection) {
- $platform = $connection->getDatabasePlatform();
- $platform->registerDoctrineTypeMapping('tinyint unsigned', 'integer');
- $platform->registerDoctrineTypeMapping('smallint unsigned', 'integer');
- $platform->registerDoctrineTypeMapping('varchar ', 'string');
-
foreach ($targetSchema->getTables() as $table) {
foreach ($table->getColumns() as $column) {
// column comments are not supported on SQLite
if ($column->getComment() !== null) {
$column->setComment(null);
}
- // with sqlite autoincrement columns is of type integer
- if ($column->getType() instanceof BigIntType && $column->getAutoincrement()) {
- $column->setType(Type::getType('integer'));
- }
}
}