Same name and namespace in other branches
  1. 6.x includes/database.pgsql.inc \db_drop_unique_key()
  2. 6.x includes/database.mysql-common.inc \db_drop_unique_key()
  3. 8.9.x core/includes/database.inc \db_drop_unique_key()

Drops a unique key.

Parameters

$table: The table to be altered.

$name: The name of the key.

Related topics

6 calls to db_drop_unique_key()
aggregator_update_7003 in modules/aggregator/aggregator.install
Increase the length of {aggregator_feed}.url.
node_update_7013 in modules/node/node.install
Change {node}.vid default value from 0 to NULL to avoid deadlock issues on MySQL.
search_update_7000 in modules/search/search.install
Replace unique keys in 'search_dataset' and 'search_index' by primary keys.
system_update_7042 in modules/system/system.install
Upgrade the {url_alias} table and create a cache bin for path aliases.
system_update_7073 in modules/system/system.install
Add binary to {file_managed}, in case system_update_7034() was run without it.

... See full list

File

includes/database/database.inc, line 3062
Core systems for the database layer.

Code

function db_drop_unique_key($table, $name) {
  return Database::getConnection()
    ->schema()
    ->dropUniqueKey($table, $name);
}