本文整理匯總了PHP中yii\db\Migration::dropIndex方法的典型用法代碼示例。如果您正苦於以下問題:PHP Migration::dropIndex方法的具體用法?PHP Migration::dropIndex怎麽用?PHP Migration::dropIndex使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類yii\db\Migration
的用法示例。
在下文中一共展示了Migration::dropIndex方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: dropIndex
/**
* @inheritdoc
* Note: table will be auto pefixied if [[$autoWrapTableNames]] is true.
*/
public function dropIndex($name, $table)
{
$table = $this->autoWrappedTableName($table);
return parent::dropIndex($name, $table);
}
示例2: dropIndex
/**
* Builds and executes a SQL statement for dropping an index.
* @param string $table the table whose index is to be dropped. The name will be properly quoted by the method.
* @param string|array $columns the column(s) that should be included in the index. If there are multiple columns, please separate them
* @param string $name the name of the index to be dropped. The name will be properly quoted by the method.
*/
public function dropIndex($table, $columns, $name = null)
{
$name = $name ?: $this->getNameIndex($table, $columns);
parent::dropIndex($name, $table);
}