You are here

heartbeat_comments.install in Heartbeat 7

Same filename and directory in other branches
  1. 6.4 modules/heartbeat_comments/heartbeat_comments.install

Installation file for heartbeat comments by Stalski - Menhir - www.menhir.be

File

modules/heartbeat_comments/heartbeat_comments.install
View source
<?php

/**
 * @file
 *   Installation file for heartbeat comments
 *   by Stalski - Menhir - www.menhir.be
 */

/**
 * Implementation of hook_schema().
 */
function heartbeat_comments_schema() {
  $schema['heartbeat_comments'] = array(
    'description' => t('Stores heartbeat comments of users.'),
    'fields' => array(
      'hcid' => array(
        'description' => t('The primary identifier for the comment.'),
        'type' => 'serial',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
      'uid' => array(
        'description' => t('The user_id from the user that commented.'),
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
      ),
      'uaid' => array(
        'description' => t('heartbeat user activity id if there is one.'),
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
      ),
      'message' => array(
        'description' => t('Reaction message'),
        'type' => 'text',
        'not null' => FALSE,
        'size' => 'big',
      ),
      'cleared' => array(
        'description' => t('Did the user clear this message?'),
        'type' => 'int',
        'size' => 'tiny',
        'not null' => TRUE,
        'default' => 0,
      ),
      'time' => array(
        'description' => t('Timestamp when the reaction has been posted'),
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
      ),
    ),
    'primary key' => array(
      'hcid',
    ),
  );
  return $schema;
}

Functions

Namesort descending Description
heartbeat_comments_schema Implementation of hook_schema().