You are here

function webform_update_6321 in Webform 6.3

Add field for block feature and redirection setting.

File

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

Code

function webform_update_6321() {
  $ret = array();
  db_add_field($ret, 'webform', 'block', array(
    'type' => 'int',
    'size' => 'tiny',
    'not null' => TRUE,
    'default' => 0,
  ));
  db_change_field($ret, 'webform', 'redirect_url', 'redirect_url', array(
    'type' => 'varchar',
    'length' => 255,
    'default' => '<confirmation>',
  ));
  update_sql("UPDATE {webform} SET redirect_url = '<confirmation>' WHERE redirect_url = '' OR redirect_url IS NULL");
  return $ret;
}