abstract public Schema::addPrimaryKey($table, $fields)
Add a primary key.
Parameters
$table: The table to be altered.
$fields: Fields for the primary key.
Throws
\Drupal\Core\Database\SchemaObjectDoesNotExistException If the specified table doesn't exist.
\Drupal\Core\Database\SchemaObjectExistsException If the specified table already has a primary key.
File
- core/lib/Drupal/Core/Database/Schema.php, line 393
Class
- Schema
- Provides a base implementation for Database Schema.
Namespace
Drupal\Core\Database
Code
abstract public function addPrimaryKey($table, $fields);
Please login to continue.