You are here

function acl_update_6 in ACL 5

Same name and namespace in other branches
  1. 6 acl.install \acl_update_6()
  2. 7 acl.install \acl_update_6()

Add priority column.

File

./acl.install, line 177

Code

function acl_update_6() {
  $ret = array();
  switch ($GLOBALS['db_type']) {
    case 'mysqli':
    case 'mysql':
      $ret[] = update_sql("ALTER TABLE {acl_node} ADD priority smallint(2) NOT NULL default 0");
      break;
    case 'pgsql':
      db_add_column($ret, 'acl_node', 'priority', 'smallint', array(
        'default' => 0,
        'not null' => TRUE,
      ));
      break;
  }
  return $ret;
}