diff options
author | Ferdinand Thiessen <rpm@fthiessen.de> | 2023-02-22 00:58:08 +0100 |
---|---|---|
committer | Ferdinand Thiessen <rpm@fthiessen.de> | 2023-02-22 01:07:26 +0100 |
commit | a9af58fd1a42c038a4008d2612eda6a9c362a91a (patch) | |
tree | baf6d2da9680f1f76776e1ff7e7c28f55d9bdbdf /lib/private/DB | |
parent | 926f795df1c69aa112a908ca274585664eaf9f30 (diff) | |
download | nextcloud-server-a9af58fd1a42c038a4008d2612eda6a9c362a91a.tar.gz nextcloud-server-a9af58fd1a42c038a4008d2612eda6a9c362a91a.zip |
fix(DB): Remove not supported column comments when using SQLite
Signed-off-by: Ferdinand Thiessen <rpm@fthiessen.de>
Diffstat (limited to 'lib/private/DB')
-rw-r--r-- | lib/private/DB/SQLiteMigrator.php | 6 |
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')); } |