You are here

function comment_notify_schema in Comment Notify 6

Same name and namespace in other branches
  1. 8 comment_notify.install \comment_notify_schema()
  2. 7 comment_notify.install \comment_notify_schema()

Implementation of hook_schema().

File

./comment_notify.install, line 38
comment_notify.install.

Code

function comment_notify_schema() {
  $schema['comment_notify'] = array(
    'description' => 'Stores information about which commenters on the site have subscriped to followup emails.',
    'fields' => array(
      'cid' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'description' => 'The comment id from {comments}.cid',
        'not null' => TRUE,
        'disp-width' => '11',
      ),
      'notify' => array(
        'type' => 'int',
        'description' => 'An integer indicating the type of subscription: 0 means not subscribed, 1 means subscribed to all comments, and 2 means only subscribed to replies of this comment.',
        'size' => 'tiny',
        'not null' => TRUE,
        'disp-width' => '11',
      ),
      'notify_hash' => array(
        'type' => 'varchar',
        'description' => 'An md5 hash of unique information about the commenter.  Used for unsubscribing users.',
        'length' => '32',
        'not null' => TRUE,
        'default' => '',
      ),
      'notified' => array(
        'type' => 'int',
        'description' => 'A boolean indicator for whether or not a notification for the comment has been sent: 1 means yes, 0 means no.',
        'size' => 'tiny',
        'not null' => TRUE,
        'default' => 0,
        'disp-width' => '11',
      ),
    ),
    'primary key' => array(
      'cid',
    ),
    'indexes' => array(
      'notify_hash' => array(
        'notify_hash',
      ),
    ),
  );
  $schema['comment_notify_user_settings'] = array(
    'fields' => array(
      'uid' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'description' => 'The user id from {users}.cid',
        'not null' => TRUE,
        'disp-width' => '11',
      ),
      'node_notify' => array(
        'type' => 'int',
        'description' => 'An integer indicating the default type of subscription: 0 means not subscribed, 1 means subscribed to all comments, and 2 means only subscribed to replies of this comment.',
        'size' => 'tiny',
        'not null' => TRUE,
        'default' => 0,
        'disp-width' => '11',
      ),
      'comment_notify' => array(
        'type' => 'int',
        'description' => 'An integer indicating the default type of subscription: 0 means not subscribed, 1 means subscribed to all comments, and 2 means only subscribed to replies of this comment.',
        'size' => 'tiny',
        'not null' => TRUE,
        'default' => 0,
        'disp-width' => '11',
      ),
    ),
    'primary key' => array(
      'uid',
    ),
  );
  return $schema;
}