summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorblizzz <blizzz@arthur-schiwon.de>2023-03-02 12:10:19 +0100
committerGitHub <noreply@github.com>2023-03-02 12:10:19 +0100
commit289fadfd504f0a36836e8c0a082a51e16d3b8da2 (patch)
tree5bdf8c16668c83881e5c85037bb0481b8437c52f /lib
parente08fa782249c201baf042c8cdf2362fc2300f85f (diff)
parent1785a80754f57b9f98285a0b98e19af8f2afbdd6 (diff)
downloadnextcloud-server-289fadfd504f0a36836e8c0a082a51e16d3b8da2.tar.gz
nextcloud-server-289fadfd504f0a36836e8c0a082a51e16d3b8da2.zip
Merge pull request #36803 from nextcloud/fix/sqlite-comments
[db]: Remove not supported column comments for SQLite
Diffstat (limited to 'lib')
-rw-r--r--lib/private/DB/SQLiteMigrator.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/private/DB/SQLiteMigrator.php b/lib/private/DB/SQLiteMigrator.php
index 2be3591afdc..cbb39070a48 100644
--- a/lib/private/DB/SQLiteMigrator.php
+++ b/lib/private/DB/SQLiteMigrator.php
@@ -39,9 +39,13 @@ class SQLiteMigrator extends Migrator {
$platform->registerDoctrineTypeMapping('smallint unsigned', 'integer');
$platform->registerDoctrineTypeMapping('varchar ', 'string');
- // with sqlite autoincrement columns is of type integer
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'));
}