/** * @param Table $localTable * @param ForeignKeyConstraint $fkConstraint */ public function acceptForeignKey(Table $localTable, ForeignKeyConstraint $fkConstraint) { if ($this->_addExplicitIndexForForeignKey) { $columns = $fkConstraint->getColumns(); if ($localTable->columnsAreIndexed($columns)) { return; } $localTable->addIndex($columns); } }
/** * @param Table $Table * @param array $ColumnList * * @return bool */ public function hasIndex(Table $Table, $ColumnList) { if ($Table->columnsAreIndexed($ColumnList)) { return true; } else { return false; } }