Commit 0aa1056c authored by zYne's avatar zYne

--no commit message

--no commit message
parent dc2e1d31
...@@ -155,10 +155,9 @@ class Doctrine_Import_Pgsql extends Doctrine_Import ...@@ -155,10 +155,9 @@ class Doctrine_Import_Pgsql extends Doctrine_Import
$columns = array(); $columns = array();
foreach ($result as $key => $val) { foreach ($result as $key => $val) {
if ($val['type'] === 'varchar') { if ($val['type'] === 'varchar') {
// need to add length to the type so we are compatible with // get length from varchar definition
// Zend_Db_Adapter_Pdo_Pgsql!
$length = preg_replace('~.*\(([0-9]*)\).*~', '$1', $val['complete_type']); $length = preg_replace('~.*\(([0-9]*)\).*~', '$1', $val['complete_type']);
$val['type'] .= '(' . $length . ')'; $val['length'] .= $length;
} }
$decl = $this->conn->dataDict->getPortableDeclaration($val); $decl = $this->conn->dataDict->getPortableDeclaration($val);
......
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