<?php
// $Id: advanced_help.install,v 1.3 2008/04/19 16:45:57 merlinofchaos Exp $
/**
 * @file advanced_help.install
 * Contains install and update functions for advanced_help.
 */

function advanced_help_install() {
  drupal_set_message('Installing advanced_help.');
  drupal_install_schema('advanced_help');
}

function advanced_help_uninstall() {
  drupal_uninstall_schema('advanced_help');
  variable_del('advanced_help_last_cron');
}

/**
 * advanced_help's initial schema.
 */
function advanced_help_schema() {
  $schema['advanced_help_index'] = array(
    'description' => t('Stores search index correlations for advanced help topics.'),
    'fields' => array(
      'sid' => array(
        'type' => 'serial',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'description' => t('The primary key to give to the search engine for this topic.'),
        'no export' => TRUE,
      ),
      'module' => array(
        'type' => 'varchar',
        'length' => '255',
        'default' => '',
        'not null' => TRUE,
        'description' => t('The module that owns this topic.'),
      ),
      'topic' => array(
        'type' => 'varchar',
        'length' => '255',
        'default' => '',
        'not null' => TRUE,
        'description' => t('The topic id.'),
      ),
      'language' => array(
        'type' => 'varchar',
        'length' => 12,
        'not null' => TRUE,
        'default' => '',
        'description' => t('The language this search index relates to.'),
      ),
    ),
    'primary key' => array('sid'),
    'indexes' => array('language' => array('language')),
  );

  return $schema;
}
