You are here

function system_update_148 in Drupal 5

Same name and namespace in other branches
  1. 4 database/updates.inc \system_update_148()

File

modules/system/system.install, line 1927

Code

function system_update_148() {
  $ret = array();

  // Add support for tracking users' session ids (useful for tracking anon users)
  switch ($GLOBALS['db_type']) {
    case 'pgsql':
      db_add_column($ret, 'accesslog', 'sid', 'varchar(32)', array(
        'not null' => TRUE,
        'default' => "''",
      ));
      break;
    case 'mysql':
    case 'mysqli':
      $ret[] = update_sql("ALTER TABLE {accesslog} ADD sid varchar(32) NOT NULL default ''");
      break;
  }
  return $ret;
}