function db_drop_field

Drops a field.

Parameters

$table: The table to be altered.

$field: The field to be dropped.

Related topics

9 calls to db_drop_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.
SchemaTest::assertFieldAdditionRemoval in drupal/core/modules/system/lib/Drupal/system/Tests/Common/SchemaTest.php
Asserts that a given field can be added and removed from a table.
SchemaTest::assertFieldCharacteristics in drupal/core/modules/system/lib/Drupal/system/Tests/Common/SchemaTest.php
Asserts that a newly added field has the correct characteristics.

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