You are here

function shouts_schema in Heartbeat 6.3

Same name and namespace in other branches
  1. 6.4 modules/shouts/shouts.install \shouts_schema()

Implementation of hook_schema().

File

modules/shouts/shouts.install, line 25

Code

function shouts_schema() {
  $schema['shouts'] = array(
    'description' => t('Stores shouts of users.'),
    'fields' => array(
      'shout_id' => array(
        'description' => t('The primary identifier for the shout.'),
        'type' => 'serial',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
      'uid' => array(
        'description' => t('The user_id from the user that shouted the message.'),
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
      ),
      'message' => array(
        'description' => t('Message of the shout'),
        '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 shout has been posted'),
        'type' => 'datetime',
        'not null' => TRUE,
      ),
    ),
    'primary key' => array(
      'shout_id',
    ),
  );
  return $schema;
}