You are here

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

Same name and namespace in other branches
  1. 8.2 drivers/lib/Drupal/Driver/Database/sqlsrv/Schema.php \Drupal\Driver\Database\sqlsrv\Schema::dropPrimaryKey()
  2. 8 drivers/lib/Drupal/Driver/Database/sqlsrv/Schema.php \Drupal\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

drivers/lib/Drupal/Driver/Database/sqlsrv/Schema.php, line 444

Class

Schema

Namespace

Drupal\Driver\Database\sqlsrv

Code

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