1.20.x 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
- includes/
database/ schema.inc, line 569 - Generic Database schema code.
Class
- DatabaseSchema
- Base class for database schema definitions.
Code
abstract public function addPrimaryKey($table, $fields);