diff --git a/CHANGELOG.md b/CHANGELOG.md index dacc54611..d38540ad4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -180,6 +180,7 @@ - Bug #1109: Fix column definition parsing in cases with brackets and escaped quotes (@vjik) - New #1107: Add abstract enumeration column type (@vjik) - Bug #1115: Do not reset `$retryHandler` property on `AbstractCommand::reset()` method call (@Tigrov) +- New #1124: Add source of column information (@Tigrov) ## 1.3.0 March 21, 2024 diff --git a/src/Constant/ColumnInfoSource.php b/src/Constant/ColumnInfoSource.php new file mode 100644 index 000000000..79cb4f448 --- /dev/null +++ b/src/Constant/ColumnInfoSource.php @@ -0,0 +1,30 @@ +isDbType($type)) { return $this->fromDbType($type, $info); diff --git a/src/Schema/Column/ColumnFactoryInterface.php b/src/Schema/Column/ColumnFactoryInterface.php index cd3381f43..6714afd01 100644 --- a/src/Schema/Column/ColumnFactoryInterface.php +++ b/src/Schema/Column/ColumnFactoryInterface.php @@ -4,6 +4,7 @@ namespace Yiisoft\Db\Schema\Column; +use Yiisoft\Db\Constant\ColumnInfoSource; use Yiisoft\Db\Constant\ColumnType; use Yiisoft\Db\Constant\PseudoType; use Yiisoft\Db\Constraint\ForeignKey; @@ -26,7 +27,6 @@ * defaultValueRaw?: string|null, * dimension?: positive-int, * extra?: string|null, - * fromResult?: bool, * primaryKey?: bool, * name?: string|null, * notNull?: bool, @@ -34,6 +34,7 @@ * scale?: int|null, * schema?: string|null, * size?: int|null, + * source?: ColumnInfoSource::*, * table?: string|null, * type?: ColumnType::*, * unique?: bool,