1
0
mirror of synced 2025-01-17 22:11:41 +03:00

Fixed unique-constraint name in XML Exporter

This commit is contained in:
Marcin Radziwoński 2012-09-26 14:27:16 +02:00
parent 831f0acdc5
commit 380f4fbac7

View File

@ -109,9 +109,9 @@ class XmlExporter extends AbstractExporter
if (isset($metadata->table['uniqueConstraints'])) {
$uniqueConstraintsXml = $root->addChild('unique-constraints');
foreach ($metadata->table['uniqueConstraints'] as $unique) {
foreach ($metadata->table['uniqueConstraints'] as $name => $unique) {
$uniqueConstraintXml = $uniqueConstraintsXml->addChild('unique-constraint');
$uniqueConstraintXml->addAttribute('name', $unique['name']);
$uniqueConstraintXml->addAttribute('name', $name);
$uniqueConstraintXml->addAttribute('columns', implode(',', $unique['columns']));
}
}