Unverified Commit 7900a0e3 authored by Guilherme Blanco's avatar Guilherme Blanco Committed by Sergei Morozov

Fixed undefined result of rebase

parent 76c0ac22
...@@ -860,10 +860,10 @@ class Table extends AbstractAsset ...@@ -860,10 +860,10 @@ class Table extends AbstractAsset
*/ */
protected function _addUniqueConstraint(UniqueConstraint $constraint) protected function _addUniqueConstraint(UniqueConstraint $constraint)
{ {
$name = strlen($uniqueConstraint->getName()) $name = strlen($constraint->getName())
? $uniqueConstraint->getName() ? $constraint->getName()
: $this->_generateIdentifierName( : $this->_generateIdentifierName(
array_merge((array) $this->getName(), $uniqueConstraint->getLocalColumns()), array_merge((array) $this->getName(), $constraint->getLocalColumns()),
'fk', 'fk',
$this->_getMaxIdentifierLength() $this->_getMaxIdentifierLength()
); );
...@@ -876,12 +876,12 @@ class Table extends AbstractAsset ...@@ -876,12 +876,12 @@ class Table extends AbstractAsset
// calling this method during hydration from schema-details all the explicitly added indexes lead to duplicates. // calling this method during hydration from schema-details all the explicitly added indexes lead to duplicates.
// This creates computation overhead in this case, however no duplicate indexes are ever added (column based). // This creates computation overhead in this case, however no duplicate indexes are ever added (column based).
$indexName = $this->_generateIdentifierName( $indexName = $this->_generateIdentifierName(
array_merge([$this->getName()], $uniqueConstraint->getColumns()), array_merge([$this->getName()], $constraint->getColumns()),
'idx', 'idx',
$this->_getMaxIdentifierLength() $this->_getMaxIdentifierLength()
); );
$indexCandidate = $this->_createIndex($uniqueConstraint->getColumns(), $indexName, true, false); $indexCandidate = $this->_createIndex($constraint->getColumns(), $indexName, true, false);
foreach ($this->_indexes as $existingIndex) { foreach ($this->_indexes as $existingIndex) {
if ($indexCandidate->isFullfilledBy($existingIndex)) { if ($indexCandidate->isFullfilledBy($existingIndex)) {
......
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