db_drop_field($table, $field)
Drops a field.
$table: The table to be altered.
$field: The field to be dropped.
bool TRUE if the field was successfully dropped, FALSE if there was no field by that name to begin with.
as of Drupal 8.0.x, will be removed in Drupal 9.0.0. Instead, get a database connection injected into your service from the container, get its schema driver, and call dropField() on it. For example, $injected_database->schema()->dropField($table, $field);
\Drupal\Core\Database\Schema::dropField()
function db_drop_field($table, $field) { return Database::getConnection()->schema()->dropField($table, $field); }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!includes!database.inc/function/db_drop_field/8.1.x