Skip to content

Commit 61cd986

Browse files
committed
Fixed PostgreSQL tests
1 parent 05ce73c commit 61cd986

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -399,9 +399,9 @@ public function getListTableColumnsSQL(string $table, ?string $database = null)
399399
WHERE c.oid = pg_attrdef.adrelid
400400
AND pg_attrdef.adnum=a.attnum
401401
) AS default,
402-
(SELECT pg_description.description
402+
COALESCE((SELECT pg_description.description
403403
FROM pg_description WHERE pg_description.objoid = c.oid AND a.attnum = pg_description.objsubid
404-
) AS comment
404+
), '') AS comment
405405
FROM pg_attribute a, pg_class c, pg_type t, pg_namespace n
406406
WHERE " . $this->getTableWhereClause($table, 'c', 'n') . '
407407
AND a.attnum > 0

lib/Doctrine/DBAL/Schema/PostgreSqlSchemaManager.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -440,14 +440,15 @@ protected function _getPortableTableColumnDefinition(array $tableColumn) : Colum
440440
'default' => $tableColumn['default'],
441441
'precision' => $precision,
442442
'scale' => $scale,
443-
'fixed' => $fixed,
444443
'unsigned' => false,
445444
'autoincrement' => $autoincrement,
446-
'comment' => isset($tableColumn['comment']) && $tableColumn['comment'] !== ''
447-
? $tableColumn['comment']
448-
: null,
445+
'comment' => $tableColumn['comment'],
449446
];
450447

448+
if ($fixed !== null) {
449+
$options['fixed'] = $fixed;
450+
}
451+
451452
$column = new Column($tableColumn['field'], Type::getType($type), $options);
452453

453454
if (isset($tableColumn['collation']) && ! empty($tableColumn['collation'])) {

0 commit comments

Comments
 (0)