示例#1
0
 /**
  * @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);
     }
 }
示例#2
0
 /**
  * @param Table $Table
  * @param array $ColumnList
  *
  * @return bool
  */
 public function hasIndex(Table $Table, $ColumnList)
 {
     if ($Table->columnsAreIndexed($ColumnList)) {
         return true;
     } else {
         return false;
     }
 }