You are here

function faq_ask_schema in FAQ_Ask 6

Same name and namespace in other branches
  1. 8 faq_ask.install \faq_ask_schema()
  2. 6.2 faq_ask.install \faq_ask_schema()
  3. 7 faq_ask.install \faq_ask_schema()

Implementation of hook_schema().

File

./faq_ask.install, line 12
This module is an add-on to the FAQ module that allows users with the 'ask question' permission to create a question which will be queued for an 'expert' to answer.

Code

function faq_ask_schema() {
  $schema['faq_expert'] = array(
    'description' => t('FAQ expert to term mapping.'),
    'fields' => array(
      'uid' => array(
        'description' => t('User identifier for the expert.'),
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
      'tid' => array(
        'description' => t('Taxonomy identifier of the terms for the expert.'),
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
    ),
    'primary key' => array(
      'uid',
      'tid',
    ),
    'indexes' => array(
      'tid' => array(
        'tid',
        'uid',
      ),
    ),
  );
  return $schema;
}