本文整理汇总了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);
}