You are here

public function DatabaseSchema_sqlsrv::_DropIndex in Drupal driver for SQL Server and SQL Azure 7.2

Same name and namespace in other branches
  1. 7.3 sqlsrv/schema.inc \DatabaseSchema_sqlsrv::_DropIndex()

Drop an index, nothing to to if the index does not exists.

Parameters

mixed $table:

mixed $index:

Return value

void

File

sqlsrv/schema.inc, line 1768
Database schema code for Microsoft SQL Server database servers.

Class

DatabaseSchema_sqlsrv

Code

public function _DropIndex($table, $index) {
  if (!$this
    ->_ExistsIndex($table, $index)) {

    // Nothing to do....
    return;
  }
  $table = $this->connection
    ->prefixTables('{' . $table . '}');
  $this->connection
    ->query_direct('DROP INDEX :index ON :table', array(
    ':index' => $index,
    ':table' => $table,
  ));
}