function db_drop_primary_key

7.x database.inc db_drop_primary_key($table)
6.x database.pgsql.inc db_drop_primary_key(&$ret, $table)
6.x database.mysql-common.inc db_drop_primary_key(&$ret, $table)

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_7001 in drupal-7.x/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 drupal-7.x/modules/field/modules/field_sql_storage/field_sql_storage.install
Fix primary keys in field revision data tables.
system_update_7065 in drupal-7.x/modules/system/system.install
Remove the default value for sid.
trigger_update_7000 in drupal-7.x/modules/trigger/trigger.install
Alter the "hook" field and drop the "op field" of {trigger_assignments}.
trigger_update_7001 in drupal-7.x/modules/trigger/trigger.install
Increase the length of the "hook" field to 78 characters.

... See full list

File

drupal-7.x/includes/database/database.inc, line 2901
Core systems for the database layer.

Code

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