Schema::addPrimaryKey

abstract public function Schema::addPrimaryKey

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.

\Dr