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
f153ce44
Commit
f153ce44
authored
Nov 01, 2013
by
Carsten Brandt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
reverted non working fix for #1115
parent
7c630a62
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
20 deletions
+5
-20
Schema.php
framework/yii/db/pgsql/Schema.php
+0
-20
PostgreSQLActiveRecordTest.php
tests/unit/framework/db/pgsql/PostgreSQLActiveRecordTest.php
+5
-0
No files found.
framework/yii/db/pgsql/Schema.php
View file @
f153ce44
...
...
@@ -318,24 +318,4 @@ SQL;
$column
->
phpType
=
$this
->
getColumnPhpType
(
$column
);
return
$column
;
}
/**
* Determines the PDO type for the given PHP data value.
* @param mixed $data the data whose PDO type is to be determined
* @return integer the PDO type
* @see http://www.php.net/manual/en/pdo.constants.php
*/
public
function
getPdoType
(
$data
)
{
static
$typeMap
=
[
// php type => PDO type
'boolean'
=>
\PDO
::
PARAM_INT
,
// Cast boolean to integer values to work around problems with PDO casting false to string '' https://bugs.php.net/bug.php?id=33876
'integer'
=>
\PDO
::
PARAM_INT
,
'string'
=>
\PDO
::
PARAM_STR
,
'resource'
=>
\PDO
::
PARAM_LOB
,
'NULL'
=>
\PDO
::
PARAM_NULL
,
];
$type
=
gettype
(
$data
);
return
isset
(
$typeMap
[
$type
])
?
$typeMap
[
$type
]
:
\PDO
::
PARAM_STR
;
}
}
tests/unit/framework/db/pgsql/PostgreSQLActiveRecordTest.php
View file @
f153ce44
...
...
@@ -11,4 +11,9 @@ use yiiunit\framework\db\ActiveRecordTest;
class
PostgreSQLActiveRecordTest
extends
ActiveRecordTest
{
protected
$driverName
=
'pgsql'
;
public
function
testBooleanAttribute
()
{
$this
->
markTestSkipped
(
'Storing boolean values does not work in PostgreSQL right now. See https://github.com/yiisoft/yii2/issues/1115 for details.'
);
}
}
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