1 schema.inc abstract public DatabaseSchema::addPrimaryKey($table, $fields)

Add a primary key.

Parameters

$table: The table to be altered.

$fields: Fields for the primary key.

Throws

DatabaseSchemaObjectDoesNotExistException If the specified table doesn't exist.

DatabaseSchemaObjectExistsException If the specified table already has a primary key.

File

core/includes/database/schema.inc, line 511
Generic Database schema code.

Class

DatabaseSchema
Base class for database schema definitions.

Code

abstract public function addPrimaryKey($table, $fields);