function webform_update_10 in Webform 5
Same name and namespace in other branches
- 5.2 webform.install \webform_update_10()
- 6.2 webform.install \webform_update_10()
Add the form_key column to the webform_component table.
File
- ./
webform.install, line 337
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;
}