fixes #718
This commit is contained in:
parent
3e7883e168
commit
500783aa31
@ -414,7 +414,7 @@ class Doctrine_DataDict_Pgsql extends Doctrine_DataDict
|
||||
return 'TIMESTAMP without time zone';
|
||||
case 'float':
|
||||
case 'double':
|
||||
return 'FLOAT8';
|
||||
return 'FLOAT';
|
||||
case 'decimal':
|
||||
$length = !empty($field['length']) ? $field['length'] : 18;
|
||||
$scale = !empty($field['scale']) ? $field['scale'] : $this->conn->getAttribute(Doctrine::ATTR_DECIMAL_PLACES);
|
||||
@ -511,6 +511,7 @@ class Doctrine_DataDict_Pgsql extends Doctrine_DataDict
|
||||
break;
|
||||
case 'datetime':
|
||||
case 'timestamp':
|
||||
case 'timestamptz':
|
||||
$type[] = 'timestamp';
|
||||
$length = null;
|
||||
break;
|
||||
@ -521,6 +522,7 @@ class Doctrine_DataDict_Pgsql extends Doctrine_DataDict
|
||||
case 'float':
|
||||
case 'float4':
|
||||
case 'double':
|
||||
case 'double precision':
|
||||
case 'real':
|
||||
$type[] = 'float';
|
||||
break;
|
||||
|
@ -86,7 +86,7 @@ class Doctrine_DataDict_Pgsql_TestCase extends Doctrine_UnitTestCase
|
||||
|
||||
$this->assertEqual($type, array('type' => array('blob', 'clob'),
|
||||
'length' => null,
|
||||
'unsigned' => null,
|
||||
'unsigned' => null,
|
||||
'fixed' => null));
|
||||
}
|
||||
public function testGetPortableDeclarationSupportsNativeTimestampTypes()
|
||||
@ -281,7 +281,7 @@ class Doctrine_DataDict_Pgsql_TestCase extends Doctrine_UnitTestCase
|
||||
{
|
||||
$a = array('type' => 'float', 'length' => 20, 'fixed' => false);
|
||||
|
||||
$this->assertEqual($this->dataDict->getNativeDeclaration($a), 'FLOAT8');
|
||||
$this->assertEqual($this->dataDict->getNativeDeclaration($a), 'FLOAT');
|
||||
}
|
||||
public function testGetNativeDefinitionSupportsBooleanType()
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user