db_add_unique_key

Versions
6
db_add_unique_key(&$ret, $table, $name, $fields)
7
db_add_unique_key($table, $name, $fields)

Add a unique key.

Parameters

$table The table to be altered.

$name The name of the key.

$fields An array of field names.

Related topics

Code

includes/database/database.inc, line 2475

<?php
function db_add_unique_key($table, $name, $fields) {
  return Database::getConnection()->schema()->addUniqueKey($table, $name, $fields);
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.