function db_drop_primary_key

Drops the primary key of a database table.

Parameters

$table: Name of the table to be altered.

Related topics

8 calls to db_drop_primary_key()
field_sql_storage_update_8000 in drupal/core/modules/field_sql_storage/field_sql_storage.install
Renames the 'language' column to 'langcode' in field data tables.
locale_update_8005 in drupal/core/modules/locale/locale.install
Update plural interface translations to new format.
node_update_8005 in drupal/core/modules/node/node.install
Make *id fields unsigned.
node_update_8015 in drupal/core/modules/node/node.install
Add language support to the {node_access} table.
search_update_8001 in drupal/core/modules/search/search.install
Adds the langcode field and indexes to {search_dataset} and {search_index}.

... See full list

File

drupal/core/includes/database.inc, line 773
Core systems for the database layer.

Code

function db_drop_primary_key($table) {
  return Database::getConnection()
    ->schema()
    ->dropPrimaryKey($table);
}