From 54239c7f10617ec52f4365264631c095cb69273a Mon Sep 17 00:00:00 2001 From: zYne Date: Sat, 10 Feb 2007 10:59:55 +0000 Subject: [PATCH] better listColumns handling --- lib/Doctrine/Import/Pgsql.php | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/lib/Doctrine/Import/Pgsql.php b/lib/Doctrine/Import/Pgsql.php index 30dd14a99..560b633f0 100644 --- a/lib/Doctrine/Import/Pgsql.php +++ b/lib/Doctrine/Import/Pgsql.php @@ -160,12 +160,19 @@ class Doctrine_Import_Pgsql extends Doctrine_Import $length = preg_replace('~.*\(([0-9]*)\).*~', '$1', $val['complete_type']); $val['type'] .= '(' . $length . ')'; } + + $decl = $this->conn->dataDict->getPortableDeclaration($val); + $description = array( - 'name' => $val['field'], - 'type' => $val['type'], - 'notnull' => ($val['isnotnull'] == ''), - 'default' => $val['default'], - 'primary' => ($val['pri'] == 't'), + 'name' => $val['field'], + 'type' => $val['type'], + 'ptype' => $decl['type'], + 'length' => $decl['length'], + 'fixed' => $decl['fixed'], + 'unsigned' => $decl['unsigned'], + 'notnull' => ($val['isnotnull'] == ''), + 'default' => $val['default'], + 'primary' => ($val['pri'] == 't'), ); $columns[$val['field']] = $description; }