function webform_update_6 in Webform 5.2
Same name and namespace in other branches
- 5 webform.install \webform_update_6()
- 6.2 webform.install \webform_update_6()
Add a parent ID to all components, allowing nested fieldsets.
File
- ./
webform.install, line 305
Code
function webform_update_6() {
$ret = array();
switch ($GLOBALS['db_type']) {
case 'pgsql':
$ret[] = update_sql("ALTER TABLE {webform_component} ADD pid integer NOT NULL DEFAULT '0'");
break;
case 'mysqli':
case 'mysql':
$ret[] = update_sql('ALTER TABLE {webform_component} ADD pid int(10) NOT NULL DEFAULT 0 AFTER cid');
break;
}
return $ret;
}