Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PSDI Army
yii2
Commits
458c4a66
Commit
458c4a66
authored
Jun 09, 2014
by
makroxyz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix PostgreSQL enumValues
$column->enumValues is set to array[0 =>''] even if $info['enum_values'] is null. Gii generates always dropDownList in forms.
parent
c19a2ff4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
Schema.php
framework/db/pgsql/Schema.php
+1
-1
No files found.
framework/db/pgsql/Schema.php
View file @
458c4a66
...
@@ -430,7 +430,7 @@ SQL;
...
@@ -430,7 +430,7 @@ SQL;
$column
->
comment
=
$info
[
'column_comment'
];
$column
->
comment
=
$info
[
'column_comment'
];
$column
->
dbType
=
$info
[
'data_type'
];
$column
->
dbType
=
$info
[
'data_type'
];
$column
->
defaultValue
=
$info
[
'column_default'
];
$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
->
unsigned
=
false
;
// has no meaning in PG
$column
->
isPrimaryKey
=
$info
[
'is_pkey'
];
$column
->
isPrimaryKey
=
$info
[
'is_pkey'
];
$column
->
name
=
$info
[
'column_name'
];
$column
->
name
=
$info
[
'column_name'
];
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment