You are here

public function Schema::dropPrimaryKey in Drupal driver for SQL Server and SQL Azure 4.1.x

Same name and namespace in other branches
  1. 4.2.x src/Driver/Database/sqlsrv/Schema.php \Drupal\sqlsrv\Driver\Database\sqlsrv\Schema::dropPrimaryKey()
  2. 3.1.x src/Driver/Database/sqlsrv/Schema.php \Drupal\sqlsrv\Driver\Database\sqlsrv\Schema::dropPrimaryKey()
  3. 4.0.x src/Driver/Database/sqlsrv/Schema.php \Drupal\sqlsrv\Driver\Database\sqlsrv\Schema::dropPrimaryKey()

Drop the primary key.

Parameters

$table: The table to be altered.

Return value

TRUE if the primary key was successfully dropped, FALSE if there was no primary key on this table to begin with.

Overrides Schema::dropPrimaryKey

File

src/Driver/Database/sqlsrv/Schema.php, line 406

Class

Schema

Namespace

Drupal\sqlsrv\Driver\Database\sqlsrv

Code

public function dropPrimaryKey($table) {
  if (!$this
    ->primaryKeyName($table)) {
    return FALSE;
  }
  $this
    ->cleanUpPrimaryKey($table);
  return TRUE;
}