You are here

function forum_schema in Drupal 6

Same name and namespace in other branches
  1. 8 core/modules/forum/forum.install \forum_schema()
  2. 7 modules/forum/forum.install \forum_schema()
  3. 9 core/modules/forum/forum.install \forum_schema()

Implementation of hook_schema().

File

modules/forum/forum.install, line 65

Code

function forum_schema() {
  $schema['forum'] = array(
    'description' => 'Stores the relationship of nodes to forum terms.',
    'fields' => array(
      'nid' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
        'description' => 'The {node}.nid of the node.',
      ),
      'vid' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
        'description' => 'Primary Key: The {node}.vid of the node.',
      ),
      'tid' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
        'description' => 'The {term_data}.tid of the forum term assigned to the node.',
      ),
    ),
    'indexes' => array(
      'nid' => array(
        'nid',
      ),
      'tid' => array(
        'tid',
      ),
    ),
    'primary key' => array(
      'vid',
    ),
  );
  return $schema;
}