1
0
mirror of synced 2024-12-14 07:06:04 +03:00

support for FKs, indented with spaces

This commit is contained in:
runa 2006-11-03 20:18:59 +00:00
parent 33b23eda3b
commit 185c334710

View File

@ -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;