From 8703d6e913218739d8869c0f513d5a36fb3a9c7a Mon Sep 17 00:00:00 2001 From: zYne Date: Sat, 10 Feb 2007 11:02:29 +0000 Subject: [PATCH] --- lib/Doctrine/Import/Oracle.php | 15 ++++++++++----- lib/Doctrine/Import/Sqlite.php | 2 +- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/lib/Doctrine/Import/Oracle.php b/lib/Doctrine/Import/Oracle.php index 506e11e47..8cc6bd222 100644 --- a/lib/Doctrine/Import/Oracle.php +++ b/lib/Doctrine/Import/Oracle.php @@ -122,12 +122,17 @@ class Doctrine_Import_Oracle extends Doctrine_Import $result = $this->conn->fetchAssoc($sql); foreach($result as $val) { + $decl = $this->conn->dataDict->getPortableDeclaration($val); + $descr[$val['column_name']] = array( - 'name' => $val['column_name'], - 'notnull' => (bool) ($val['nullable'] === 'N'), // nullable is N when mandatory - 'type' => $val['data_type'], - 'default' => $val['data_default'], - 'length' => $val['data_length'] + 'name' => $val['column_name'], + 'notnull' => (bool) ($val['nullable'] === 'N'), // nullable is N when mandatory + 'type' => $val['data_type'], + 'ptype' => $decl['type'], + 'fixed' => $decl['fixed'], + 'unsigned' => $decl['unsigned'], + 'default' => $val['data_default'], + 'length' => $val['data_length'] ); } return $result; diff --git a/lib/Doctrine/Import/Sqlite.php b/lib/Doctrine/Import/Sqlite.php index ec94ddfdf..2a4d41c87 100644 --- a/lib/Doctrine/Import/Sqlite.php +++ b/lib/Doctrine/Import/Sqlite.php @@ -149,7 +149,7 @@ class Doctrine_Import_Sqlite extends Doctrine_Import */ public function listTableIndexes($table) { - $sql = 'PRAGMA index_list(' . $table . ')'; + $sql = 'PRAGMA index_list(' . $table . ')'; return $this->conn->fetchColumn($sql); } /**