function forum_schema

7.x forum.install forum_schema()
6.x forum.install forum_schema()

Implementation of hook_schema().

File

drupal-6.x/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;
}