You are here

function discussthis_schema in Discuss This! 6

Same name and namespace in other branches
  1. 7.2 discussthis.install \discussthis_schema()
  2. 7 discussthis.install \discussthis_schema()

\brief Implementation hook_schema()

1 call to discussthis_schema()
discussthis_update_6002 in ./discussthis.install
\brief Implementation of hook_update_#()

File

./discussthis.install, line 11
Installtion functions for Discuss This! module.

Code

function discussthis_schema() {
  $schema['discussthis'] = array(
    'fields' => array(
      'nid' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ),
      'topic_nid' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ),
    ),
    'primary key' => array(
      'nid',
    ),
  );
  $schema['discussthis_forums'] = array(
    'fields' => array(
      'nid' => array(
        'description' => 'Settings apply to this node.',
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ),
      'forum_tid' => array(
        'description' => 'This node discussions will go to this forum (only applies to first post.) If -1, prevent Discuss This! on this node.',
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
      ),
    ),
    'primary key' => array(
      'nid',
    ),
  );

  //$schema['discussthis_comment'] = array(

  // ... table used to save the comment until approaval from
  //     an administrator is received -- this is probably a
  //     copy of the $schema['comment'] of the Comment module
  //     with the nid being the source node and not the forum

  //);
  return $schema;
}