Commit 185c3347 authored by runa's avatar runa

support for FKs, indented with spaces

parent 33b23eda
......@@ -84,6 +84,13 @@ class Doctrine_Import_Reader_Db extends Doctrine_Import_Reader
$table->addColumn($tableColumn);
}
$db->addTable($table);
if ($fks = $dataDict->listTableConstraints($tableName)){
foreach($fks as $fk){
$relation = new Doctrine_Schema_Relation();
$relation->setRelationBetween($fk['referencingColumn'],$fk['referencedTable'],$fk['referencedColumn']);
$table->setRelation($relation);
}
}
}
return $schema;
......
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