DatabaseSchema::addPrimaryKey

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

Add a primary key.

@throws DatabaseSchemaObjectExistsException If the specified table already has 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.

File

includes/database/schema.inc, line 501
Generic Database schema code.

Code

abstract public function addPrimaryKey($table, $fields);
Login or register to post comments