You are here

function acl_update_1 in ACL 5

Fixes table prefix

File

./acl.install, line 76

Code

function acl_update_1() {
  $ret = array();
  switch ($GLOBALS['db_type']) {
    case 'mysqli':
    case 'mysql':
      db_query('LOCK TABLES {sequences} WRITE');
      $ret[] = update_sql("UPDATE {sequences} SET name = '" . db_prefix_tables('{acl}_acl_id') . "' WHERE name = 'acl_id'");
      db_query('UNLOCK TABLES');
      break;
    case 'pgsql':
      db_query('START TRANSACTION;');
      $ret[] = update_sql("CREATE SEQUENCE {acl}_acl_id_seq START " . db_next_id('acl_id'));
      db_query('COMMIT;');
      break;
  }
  return $ret;
}