Merge pull request #455 from radmar/master
Fixed unique-constraint name in XML Exporter
This commit is contained in:
commit
f7220ae416
@ -109,9 +109,9 @@ class XmlExporter extends AbstractExporter
|
|||||||
if (isset($metadata->table['uniqueConstraints'])) {
|
if (isset($metadata->table['uniqueConstraints'])) {
|
||||||
$uniqueConstraintsXml = $root->addChild('unique-constraints');
|
$uniqueConstraintsXml = $root->addChild('unique-constraints');
|
||||||
|
|
||||||
foreach ($metadata->table['uniqueConstraints'] as $unique) {
|
foreach ($metadata->table['uniqueConstraints'] as $name => $unique) {
|
||||||
$uniqueConstraintXml = $uniqueConstraintsXml->addChild('unique-constraint');
|
$uniqueConstraintXml = $uniqueConstraintsXml->addChild('unique-constraint');
|
||||||
$uniqueConstraintXml->addAttribute('name', $unique['name']);
|
$uniqueConstraintXml->addAttribute('name', $name);
|
||||||
$uniqueConstraintXml->addAttribute('columns', implode(',', $unique['columns']));
|
$uniqueConstraintXml->addAttribute('columns', implode(',', $unique['columns']));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user