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 Jan 4, 2018
1 parent c71b3ae commit 2f9da39
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 @@ -911,10 +911,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()), "fk", $this->_getMaxIdentifierLength()
array_merge((array) $this->getName(), $constraint->getLocalColumns()), "fk", $this->_getMaxIdentifierLength()
)
;

Expand All @@ -926,10 +926,10 @@ 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(array($this->getName()), $uniqueConstraint->getColumns()), "idx", $this->_getMaxIdentifierLength()
array_merge(array($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 2f9da39

Please sign in to comment.