From a9af58fd1a42c038a4008d2612eda6a9c362a91a Mon Sep 17 00:00:00 2001 From: Ferdinand Thiessen Date: Wed, 22 Feb 2023 00:58:08 +0100 Subject: fix(DB): Remove not supported column comments when using SQLite Signed-off-by: Ferdinand Thiessen --- lib/private/DB/SQLiteMigrator.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'lib/private/DB') 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')); } -- cgit v1.2.3