You are here

function advanced_help_schema in Advanced Help 8

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

Implements hook_schema().

File

./advanced_help.install, line 10

Code

function advanced_help_schema() {
  $schema['advanced_help_index'] = [
    'description' => 'Stores search index correlations for advanced help topics.',
    'fields' => [
      'sid' => [
        'type' => 'serial',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'description' => 'The primary key to give to the search engine for this topic.',
        'no export' => TRUE,
      ],
      'module' => [
        'type' => 'varchar',
        'length' => '255',
        'default' => '',
        'not null' => TRUE,
        'description' => 'The module that owns this topic.',
      ],
      'topic' => [
        'type' => 'varchar',
        'length' => '255',
        'default' => '',
        'not null' => TRUE,
        'description' => 'The topic id.',
      ],
      'langcode' => [
        'type' => 'varchar',
        'length' => 12,
        'not null' => TRUE,
        'default' => '',
        'description' => 'The langcode this search index relates to.',
      ],
    ],
    'primary key' => [
      'sid',
    ],
    'indexes' => [
      'langcode' => [
        'langcode',
      ],
    ],
    'foreign keys' => [
      'system' => [
        'table' => 'system',
        'columns' => [
          'name' => 'name',
        ],
      ],
    ],
  ];
  return $schema;
}