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