You are here

function webform_update_2 in Webform 5.2

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

Schema changes 2: Added redirect_post column in webform table.

File

./webform.install, line 235

Code

function webform_update_2() {
  $ret = array();
  switch ($GLOBALS['db_type']) {
    case 'pgsql':
      $ret[] = update_sql("ALTER TABLE {webform} ADD redirect_post int(1) UNSIGNED NOT NULL DEFAULT '0'");
      break;
    case 'mysqli':
    case 'mysql':
      $ret[] = update_sql("ALTER TABLE {webform} ADD redirect_post int(1) UNSIGNED NOT NULL DEFAULT '0' AFTER confirmation");
      break;
  }
  return $ret;
}