Details
-
Type:
New Feature
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 1.2.2
-
Fix Version/s: 1.2.4
-
Component/s: None
-
Labels:None
-
Environment:apacha2, linux, Symfony 1.4
Description
collaboration of vtamara@pasosdejesus.org and jeronimo0000@gmail.com
While we developed a tool with symfony 1.4 and postgresql database we found errors in the generated schema.yml which I describe below
1 - Error in generating of field size of varchars
2 - Error in the generation of date fields
We found the following solution
— Doctrine/Import/Pgsql.php.orig 2010-12-23 17:48:00.160271000 -0500
+++ Doctrine/Import/Pgsql.php 2010-12-23 18:01:59.252271002 -0500
@@ -168,11 +168,14 @@
$columns = array();
foreach ($result as $key => $val) {
$val = array_change_key_case($val, CASE_LOWER);
- if (strtolower($val['type']) === 'character varying') {
+ if (strtolower($val['type']) === 'varchar') { // get length from varchar definition $length = preg_replace('~.*\(([0-9]*)\).*~', '$1', $val['complete_type']); $val['length'] = $length; }+ if ($val['type'] == 'date')
{ + $val['type'] = $val['complete_type'] = 'timestamp'; + }
$decl = $this->conn->dataDict->getPortableDeclaration($val);