1
0
mirror of synced 2025-01-29 19:41:45 +03:00
This commit is contained in:
zYne 2008-01-08 21:22:37 +00:00
parent 3e7883e168
commit 500783aa31
2 changed files with 5 additions and 3 deletions

View File

@ -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;

View File

@ -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()
{