You are here

function webform_update_6201 in Webform 6.2

Same name and namespace in other branches
  1. 6.3 webform.install \webform_update_6201()

Add a column for email to the webform_component table.

File

./webform.install, line 835
Webform module install/schema hooks.

Code

function webform_update_6201() {
  $ret = array();

  // This update will already be run as webform_update_5201 on Drupal 5.
  if (db_column_exists('webform_component', 'email')) {
    return $ret;
  }
  db_add_field($ret, 'webform_component', 'email', array(
    'type' => 'int',
    'size' => 'tiny',
    'not null' => TRUE,
    'default' => 0,
  ));
  $ret[] = update_sql('UPDATE {webform_component} SET email = 1');
  return $ret;
}