You are here

function webform_update_10 in Webform 6.2

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

Add the form_key column to the webform_component table.

File

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

Code

function webform_update_10() {
  $ret = array();
  switch ($GLOBALS['db_type']) {
    case 'pgsql':
      $ret[] = update_sql('ALTER TABLE {webform_component} ADD form_key varchar(128) NULL DEFAULT NULL');
      break;
    case 'mysqli':
    case 'mysql':
      $ret[] = update_sql('ALTER TABLE {webform_component} ADD form_key varchar(128) NULL DEFAULT NULL AFTER pid');
      break;
  }
  return $ret;
}