Browse Source

Merge PR #3751 branch 'master' of https://github.com/makroxyz/yii2

* 'master' of https://github.com/makroxyz/yii2:
  Fix PostgreSQL enumValues
tags/2.0.0-rc
Carsten Brandt 10 years ago
parent
commit
a836ec177a
  1. 1
      framework/CHANGELOG.md
  2. 2
      framework/db/pgsql/Schema.php

1
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)

2
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'];

Loading…
Cancel
Save