function db_drop_field

Drops a field.

Parameters

$table: The table to be altered.

$field: The field to be dropped.

Related topics

12 calls to db_drop_field()
block_update_8008 in drupal/core/modules/block/block.install
Migrate {block_custom}.body and {block_custom}.format to block_body field.
locale_update_8000 in drupal/core/modules/locale/locale.install
Drops textgroup support.
locale_update_8005 in drupal/core/modules/locale/locale.install
Update plural interface translations to new format.
locale_update_8014 in drupal/core/modules/locale/locale.install
Drop old 'location' field.
node_update_8018 in drupal/core/modules/node/node.install
Upgrade node schema to the standard entity SQL schema: delete old fields.

... See full list

File

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

Code

function db_drop_field($table, $field) {
  return Database::getConnection()
    ->schema()
    ->dropField($table, $field);
}