You are here

function workflow_update_3 in Workflow 6.2

Same name and namespace in other branches
  1. 5.2 workflow.install \workflow_update_3()
  2. 5 workflow.install \workflow_update_3()
  3. 6 workflow.install \workflow_update_3()

File

./workflow.install, line 173

Code

function workflow_update_3() {
  $ret = array();
  switch ($GLOBALS['db_type']) {
    case 'mysqli':
    case 'mysql':
      $ret[] = update_sql("ALTER TABLE {workflow_node_history} ADD old_sid int(10) unsigned NOT NULL AFTER nid");
      $ret[] = update_sql("ALTER TABLE {workflow_node_history} ADD comment longtext");
      $ret[] = update_sql("ALTER TABLE {workflows} ADD tab_roles varchar(60) NOT NULL");
      break;
    case 'pgsql':
      db_add_column($ret, 'workflow_node_history', 'old_sid', 'integer', array(
        'default' => 0,
        'not null' => TRUE,
      ));
      db_add_column($ret, 'workflow_node_history', 'comment', 'text', array(
        'default' => '',
        'not null' => TRUE,
      ));
      db_add_column($ret, 'workflows', 'tab_roles', 'varchar(60)', array(
        'default' => '',
        'not null' => TRUE,
      ));
      break;
  }
  return $ret;
}