Browse Source

fix(DB): Remove not supported column comments when using SQLite

Signed-off-by: Ferdinand Thiessen <rpm@fthiessen.de>
pull/36803/head
Ferdinand Thiessen 3 years ago
parent
commit
a9af58fd1a
  1. 6
      lib/private/DB/SQLiteMigrator.php

6
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'));
}

Loading…
Cancel
Save