You are here

function system_update_1012 in Drupal 5

Related topics

File

modules/system/system.install, line 3365

Code

function system_update_1012() {
  $ret = array();
  switch ($GLOBALS['db_type']) {
    case 'mysql':
    case 'mysqli':
      $ret[] = update_sql("ALTER TABLE {file_revisions} ADD INDEX(vid)");
      $ret[] = update_sql("ALTER TABLE {files} ADD INDEX(nid)");
      break;
    case 'pgsql':
      $ret[] = update_sql('CREATE INDEX {file_revisions}_vid_idx ON {file_revisions} (vid)');
      $ret[] = update_sql('CREATE INDEX {files}_nid_idx ON {files} (nid)');
      break;
  }
  return $ret;
}