You are here

function webform_update_6 in Webform 6.2

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

Add a parent ID to all components, allowing nested fieldsets.

File

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

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;
}