protected function Schema::recreatePrimaryKey in Drupal driver for SQL Server and SQL Azure 8
Same name and namespace in other branches
- 8.2 drivers/lib/Drupal/Driver/Database/sqlsrv/Schema.php \Drupal\Driver\Database\sqlsrv\Schema::recreatePrimaryKey()
- 3.0.x drivers/lib/Drupal/Driver/Database/sqlsrv/Schema.php \Drupal\Driver\Database\sqlsrv\Schema::recreatePrimaryKey()
Drops the current primary key and creates a new one. If the previous primary key was an internal primary key, it tries to cleant it up.
Parameters
mixed $table:
mixed $primary_key_sql:
File
- drivers/
lib/ Drupal/ Driver/ Database/ sqlsrv/ Schema.php, line 558 - Definition of Drupal\Driver\Database\sqlsrv\Schema
Class
Namespace
Drupal\Driver\Database\sqlsrvCode
protected function recreatePrimaryKey($table, $fields) {
// Drop the existing primary key if exists, if it was a TPK
// it will get completely dropped.
$this
->cleanUpPrimaryKey($table);
$this
->createPrimaryKey($table, $fields);
}