You are here

function webform_update_8 in Webform 5.2

Same name and namespace in other branches
  1. 5 webform.install \webform_update_8()
  2. 6.2 webform.install \webform_update_8()

Add additional validate and submit processing columns.

File

./webform.install, line 343

Code

function webform_update_8() {
  $ret = array();
  switch ($GLOBALS['db_type']) {
    case 'pgsql':
      $ret[] = update_sql('ALTER TABLE {webform} ADD additional_validate text DEFAULT NULL');
      $ret[] = update_sql('ALTER TABLE {webform} ADD additional_submit text DEFAULT NULL');
      break;
    case 'mysqli':
    case 'mysql':
      $ret[] = update_sql('ALTER TABLE {webform} ADD additional_validate text DEFAULT NULL AFTER email_subject');
      $ret[] = update_sql('ALTER TABLE {webform} ADD additional_submit text DEFAULT NULL AFTER additional_validate');
      break;
  }
  return $ret;
}