lib/Doctrine/DBAL/Schema/Index.php
public function overrules(Index $other)
    {
        if ($other->isPrimary()) {
            return false;
        }

        if ($this->isSimpleIndex() && $other->isUnique()) {
            return false;
        }

        return $this->spansColumns($other->getColumns()) && ($this->isPrimary() || $this->isUnique()) && $this->samePartialIndex($other);
    }
public function overrules(Index $other)
    {
        if ($other->isPrimary()) {
            return false;
        }

        if ($this->isSimpleIndex() && $other->isUnique()) {
            return false;
        }

        return $this->spansColumns($other->getColumns()) && ($this->isPrimary() || $this->isUnique()) && $this->samePartialIndex($other);
    }
public function overrules ( Index $ other ) { if ( $ other -> isPrimary ( ) ) { return false ; } if ( $ this -> isSimpleIndex ( ) && $ other -> isUnique ( ) ) { return false ; } return $ this -> spansColumns ( $ other -> getColumns ( ) ) && ( $ this -> isPrimary ( ) || $ this -> isUnique ( ) ) && $ this -> samePartialIndex ( $ other ) ; }
Detects if the other index is a non-unique, non primary index that can be overwritten by this one.

@return bool
Detects if the other index is a non - unique non primary index that can be overwritten by this one .