dropIndex() public method

Builds and executes a SQL statement for dropping an index.
public dropIndex ( string $name, string $table )
$name string the name of the index to be dropped. The name will be properly quoted by the method.
$table string the table whose index is to be dropped. The name will be properly quoted by the method.
Example #1
0
 /**
  * @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);
 }
Example #2
0
 /**
  * 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);
 }