You are here

function system_update_132 in Drupal 4

Same name and namespace in other branches
  1. 5 modules/system/system.install \system_update_132()

File

database/updates.inc, line 477

Code

function system_update_132() {

  /**
   * PostgreSQL only update.
   */
  $ret = array();
  if (!variable_get('update_132_done', FALSE)) {
    if ($GLOBALS['db_type'] == 'pgsql') {
      $ret[] = update_sql('DROP TABLE {search_total}');
      $ret[] = update_sql("CREATE TABLE {search_total} (\n        word varchar(50) NOT NULL default '',\n             count float default NULL)");
      $ret[] = update_sql('CREATE INDEX {search_total}_word_idx ON {search_total}(word)');

      /**
       * Wipe the search index
       */
      include_once './modules/search.module';
      search_wipe();
    }
    variable_del('update_132_done');
  }
  return $ret;
}