mirror of
https://github.com/nextcloud/server.git
synced 2026-04-15 22:11:17 -04:00
fix(DB): Remove not supported column comments when using SQLite
Signed-off-by: Ferdinand Thiessen <rpm@fthiessen.de>
This commit is contained in:
parent
c92fd66175
commit
ba49c33d30
1 changed files with 5 additions and 1 deletions
|
|
@ -40,9 +40,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'));
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue