Skip to content

Commit

Permalink
Fixed undefined result of rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
guilhermeblanco authored and morozov committed Nov 2, 2019
1 parent 76c0ac2 commit 7900a0e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/Doctrine/DBAL/Schema/Table.php
Original file line number Diff line number Diff line change
Expand Up @@ -860,10 +860,10 @@ protected function _addIndex(Index $indexCandidate)
*/
protected function _addUniqueConstraint(UniqueConstraint $constraint)
{
$name = strlen($uniqueConstraint->getName())
? $uniqueConstraint->getName()
$name = strlen($constraint->getName())
? $constraint->getName()
: $this->_generateIdentifierName(
array_merge((array) $this->getName(), $uniqueConstraint->getLocalColumns()),
array_merge((array) $this->getName(), $constraint->getLocalColumns()),
'fk',
$this->_getMaxIdentifierLength()
);
Expand All @@ -876,12 +876,12 @@ protected function _addUniqueConstraint(UniqueConstraint $constraint)
// 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).
$indexName = $this->_generateIdentifierName(
array_merge([$this->getName()], $uniqueConstraint->getColumns()),
array_merge([$this->getName()], $constraint->getColumns()),
'idx',
$this->_getMaxIdentifierLength()
);

$indexCandidate = $this->_createIndex($uniqueConstraint->getColumns(), $indexName, true, false);
$indexCandidate = $this->_createIndex($constraint->getColumns(), $indexName, true, false);

foreach ($this->_indexes as $existingIndex) {
if ($indexCandidate->isFullfilledBy($existingIndex)) {
Expand Down

0 comments on commit 7900a0e

Please sign in to comment.