You are here

function db_drop_primary_key in Drupal 7

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

Drops the primary key of a database table.

Parameters

$table: Name of the table to be altered.

Related topics

7 calls to db_drop_primary_key()
field_sql_storage_update_7001 in modules/field/modules/field_sql_storage/field_sql_storage.install
Remove the field_config_entity_type table and store 'entity_type' strings.
field_sql_storage_update_7002 in modules/field/modules/field_sql_storage/field_sql_storage.install
Fix primary keys in field revision data tables.
node_update_7016 in modules/node/node.install
Change {history}.nid to an unsigned int in order to match {node}.nid.
system_update_7065 in modules/system/system.install
Remove the default value for sid.
trigger_update_7000 in modules/trigger/trigger.install
Alter the "hook" field and drop the "op field" of {trigger_assignments}.

... See full list

File

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

Code

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