Commit 500783aa authored by zYne's avatar zYne

fixes #718

parent 3e7883e1
...@@ -414,7 +414,7 @@ class Doctrine_DataDict_Pgsql extends Doctrine_DataDict ...@@ -414,7 +414,7 @@ class Doctrine_DataDict_Pgsql extends Doctrine_DataDict
return 'TIMESTAMP without time zone'; return 'TIMESTAMP without time zone';
case 'float': case 'float':
case 'double': case 'double':
return 'FLOAT8'; return 'FLOAT';
case 'decimal': case 'decimal':
$length = !empty($field['length']) ? $field['length'] : 18; $length = !empty($field['length']) ? $field['length'] : 18;
$scale = !empty($field['scale']) ? $field['scale'] : $this->conn->getAttribute(Doctrine::ATTR_DECIMAL_PLACES); $scale = !empty($field['scale']) ? $field['scale'] : $this->conn->getAttribute(Doctrine::ATTR_DECIMAL_PLACES);
...@@ -511,6 +511,7 @@ class Doctrine_DataDict_Pgsql extends Doctrine_DataDict ...@@ -511,6 +511,7 @@ class Doctrine_DataDict_Pgsql extends Doctrine_DataDict
break; break;
case 'datetime': case 'datetime':
case 'timestamp': case 'timestamp':
case 'timestamptz':
$type[] = 'timestamp'; $type[] = 'timestamp';
$length = null; $length = null;
break; break;
...@@ -521,6 +522,7 @@ class Doctrine_DataDict_Pgsql extends Doctrine_DataDict ...@@ -521,6 +522,7 @@ class Doctrine_DataDict_Pgsql extends Doctrine_DataDict
case 'float': case 'float':
case 'float4': case 'float4':
case 'double': case 'double':
case 'double precision':
case 'real': case 'real':
$type[] = 'float'; $type[] = 'float';
break; break;
......
...@@ -86,7 +86,7 @@ class Doctrine_DataDict_Pgsql_TestCase extends Doctrine_UnitTestCase ...@@ -86,7 +86,7 @@ class Doctrine_DataDict_Pgsql_TestCase extends Doctrine_UnitTestCase
$this->assertEqual($type, array('type' => array('blob', 'clob'), $this->assertEqual($type, array('type' => array('blob', 'clob'),
'length' => null, 'length' => null,
'unsigned' => null, 'unsigned' => null,
'fixed' => null)); 'fixed' => null));
} }
public function testGetPortableDeclarationSupportsNativeTimestampTypes() public function testGetPortableDeclarationSupportsNativeTimestampTypes()
...@@ -281,7 +281,7 @@ class Doctrine_DataDict_Pgsql_TestCase extends Doctrine_UnitTestCase ...@@ -281,7 +281,7 @@ class Doctrine_DataDict_Pgsql_TestCase extends Doctrine_UnitTestCase
{ {
$a = array('type' => 'float', 'length' => 20, 'fixed' => false); $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() public function testGetNativeDefinitionSupportsBooleanType()
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment