db_drop_field

Versions
6
db_drop_field(&$ret, $table, $field)
7
db_drop_field($table, $field)

Drop a field.

Parameters

$ret Array to which query results will be added.

$table The table to be altered.

$field The field to be dropped.

Related topics

▾ 4 functions call db_drop_field()

db_change_field in includes/database.pgsql.inc
Change a field definition.
locale_update_6001 in modules/locale/locale.install
Change locale column to language. The language column is added by update_fix_d6_requirements() in update.php to avoid a large number of error messages from update.php. All we need to do here is copy locale to language and then drop locale.
system_update_6008 in modules/system/system.install
Add info files to themes. The info and owner columns are added by update_fix_d6_requirements() in update.php to avoid a large number of error messages from update.php. All we need to do here is copy description to owner and then drop description.
system_update_6036 in modules/system/system.install
Change the search schema and indexing.

Code

includes/database.pgsql.inc, line 713

<?php
function db_drop_field(&$ret, $table, $field) {
  $ret[] = update_sql('ALTER TABLE {'. $table .'} DROP COLUMN '. $field);
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.