diff --git a/framework/CHANGELOG.md b/framework/CHANGELOG.md index e2b7a93..6733d2c 100644 --- a/framework/CHANGELOG.md +++ b/framework/CHANGELOG.md @@ -40,6 +40,7 @@ Yii Framework 2 Change Log - Bug #3601: Fixed the bug that the refresh URL was not generated correctly by `Captcha` (qiangxue, klevron) - Bug #3715: Fixed the bug that using a custom pager/sorter with `GridView` may generate two different pagers/sorters if the layout configures two pagers/sorters (qiangxue) - Bug #3716: `DynamicModel::validateData()` does not call `validate()` if the `$rules` parameter is empty (qiangxue) +- Bug #3751: Fixed postgreSQL schema data for enum values, do not add values if there are none (makroxyz) - Bug #3752: `QueryBuilder::batchInsert()` does not typecast input values (qiangxue) - Bug: Fixed inconsistent return of `\yii\console\Application::runAction()` (samdark) - Bug: URL encoding for the route parameter added to `\yii\web\UrlManager` (klimov-paul) diff --git a/framework/db/pgsql/Schema.php b/framework/db/pgsql/Schema.php index c01f392..148a95a 100644 --- a/framework/db/pgsql/Schema.php +++ b/framework/db/pgsql/Schema.php @@ -430,7 +430,7 @@ SQL; $column->comment = $info['column_comment']; $column->dbType = $info['data_type']; $column->defaultValue = $info['column_default']; - $column->enumValues = explode(',', str_replace(["''"], ["'"], $info['enum_values'])); + $column->enumValues = ($info['enum_values'] !== null) ? explode(',', str_replace(["''"], ["'"], $info['enum_values'])) : null; $column->unsigned = false; // has no meaning in PG $column->isPrimaryKey = $info['is_pkey']; $column->name = $info['column_name'];