1 database.inc | db_add_unique_key($table, $name, array $fields) |
Adds a unique key.
Parameters
string $table: The table to be altered.
string $name: The name of the key.
array $fields: An array of field names.
Return value
void:
Related topics
File
- core/
includes/ database/ database.inc, line 3214 - Core systems for the database layer.
Code
function db_add_unique_key($table, $name, array $fields) {
Database::getConnection()->schema()->addUniqueKey($table, $name, $fields);
}