function db_drop_primary_key

Drops the primary key of a database table.

Parameters

$table: Name of the table to be altered.

Related topics

6 calls to db_drop_primary_key()
field_sql_storage_update_8000 in drupal/core/modules/field/modules/field_sql_storage/field_sql_storage.install
Changes field language into langcode.
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.
statistics_update_8001 in drupal/core/modules/statistics/statistics.install
Make *id fields unsigned.
tracker_update_8001 in drupal/core/modules/tracker/tracker.install
Make *id fields unsigned.

... 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);
}