You are here

function advanced_help_schema in Advanced Help 7

Same name and namespace in other branches
  1. 8 advanced_help.install \advanced_help_schema()
  2. 6 advanced_help.install \advanced_help_schema()

Implements hook_schema().

File

./advanced_help.install, line 22
Contains install and update functions for advanced_help.

Code

function advanced_help_schema() {
  $schema['advanced_help_index'] = array(
    'description' => 'Stores search index correlations for advanced help topics.',
    'fields' => array(
      'sid' => array(
        'type' => 'serial',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'description' => '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' => 'The module that owns this topic.',
      ),
      'topic' => array(
        'type' => 'varchar',
        'length' => '255',
        'default' => '',
        'not null' => TRUE,
        'description' => 'The topic id.',
      ),
      'language' => array(
        'type' => 'varchar',
        'length' => 12,
        'not null' => TRUE,
        'default' => '',
        'description' => 'The language this search index relates to.',
      ),
    ),
    'primary key' => array(
      'sid',
    ),
    'indexes' => array(
      'language' => array(
        'language',
      ),
    ),
    'foreign keys' => array(
      'system' => array(
        'table' => 'system',
        'columns' => array(
          'name' => 'name',
        ),
      ),
    ),
  );
  return $schema;
}