You are here

function drupalchat_notifications_schema in DrupalChat 6.2

Same name and namespace in other branches
  1. 7.2 drupalchat_notifications/drupalchat_notifications.install \drupalchat_notifications_schema()
  2. 7 drupalchat_notifications/drupalchat_notifications.install \drupalchat_notifications_schema()

Implementation of hook_schema().

File

drupalchat_notifications/drupalchat_notifications.install, line 29
Installation file for the DrupalChat Notifications module.

Code

function drupalchat_notifications_schema() {
  $schema = array();
  $schema['drupalchat_notifications'] = array(
    'fields' => array(
      'nfid' => array(
        'description' => 'Uid of the sender.',
        'type' => 'int',
        'not null' => TRUE,
        'unsigned' => TRUE,
      ),
      'uid' => array(
        'description' => 'Uid of the receiver.',
        'type' => 'int',
        'not null' => TRUE,
        'unsigned' => TRUE,
      ),
      'message' => array(
        'type' => 'text',
        'size' => 'big',
        'not null' => TRUE,
        'description' => 'Chat message.',
      ),
      'timestamp' => array(
        'description' => 'The Unix timestamp when the XMPP account was created.',
        'type' => 'int',
        'not null' => TRUE,
        'unsigned' => TRUE,
      ),
    ),
    'primary key' => array(
      'nfid',
    ),
    'indexes' => array(
      'uid' => array(
        'uid',
      ),
    ),
  );
  return $schema;
}