From abf223b004f649313e61d1e7afaf150c0de8c89b Mon Sep 17 00:00:00 2001 From: Tigrov Date: Wed, 3 Dec 2025 17:01:36 +0700 Subject: [PATCH 1/2] Add source of column information --- src/Schema.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Schema.php b/src/Schema.php index 96e678caa..8350e8351 100644 --- a/src/Schema.php +++ b/src/Schema.php @@ -4,6 +4,7 @@ namespace Yiisoft\Db\Pgsql; +use Yiisoft\Db\Constant\ColumnInfoSource; use Yiisoft\Db\Constant\ColumnType; use Yiisoft\Db\Constant\ReferentialAction; use Yiisoft\Db\Constraint\Check; @@ -422,7 +423,7 @@ protected function loadResultColumn(array $metadata): ?ColumnInterface $dbType = $metadata['native_type']; - $columnInfo = ['fromResult' => true]; + $columnInfo = ['source' => ColumnInfoSource::QUERY_RESULT]; if (!empty($metadata['table'])) { $columnInfo['table'] = $metadata['table']; @@ -534,6 +535,7 @@ private function loadColumn(array $info): ColumnInterface 'scale' => $info['scale'] !== null ? (int) $info['scale'] : null, 'schema' => $info['schema'], 'size' => $info['size'] !== null ? (int) $info['size'] : null, + 'source' => ColumnInfoSource::TABLE_SCHEMA, 'table' => $info['table'], 'unique' => $info['contype'] === 'u', ]; From 1b0f13fa190a9d36eafc357c927e35d5606542c6 Mon Sep 17 00:00:00 2001 From: Tigrov Date: Thu, 4 Dec 2025 16:34:30 +0700 Subject: [PATCH 2/2] Add line to CHANGELOG.md [skip ci] --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5907dd388..24509ea6e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -61,6 +61,7 @@ - Enh #464: Load column's check expressions for table schema (@Tigrov) - Bug #467: Fix column definition parsing in cases with parentheses (@vjik) - New #465: Add enumeration column type support (@vjik) +- New #471: Add source of column information (@Tigrov) ## 1.3.0 March 21, 2024