function message_digest_schema in Message Digest 7
Same name and namespace in other branches
- 8 message_digest.install \message_digest_schema()
Implementation of hook_schema(). Add the message_digest table.
File
- ./
message_digest.install, line 7
Code
function message_digest_schema() {
$schema['message_digest'] = array(
'description' => 'Storage of all sent messages for use in message digests',
'fields' => array(
'id' => array(
'type' => 'serial',
'not null' => TRUE,
'description' => 'Primary Key: Numeric message notification ID.',
),
'mid' => array(
'description' => 'The message ID of the originating message.',
'type' => 'int',
'not null' => TRUE,
'default' => 0,
'unsigned' => TRUE,
),
'gid' => array(
'description' => 'The group ID of the originating message.',
'type' => 'int',
'not null' => TRUE,
'default' => 0,
'unsigned' => TRUE,
),
'receiver' => array(
'description' => 'The user ID of the acting user.',
'type' => 'int',
'not null' => TRUE,
'default' => 0,
'unsigned' => TRUE,
),
'notifier' => array(
'description' => 'The notification method used to send the notification.',
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
),
'sent' => array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,
'size' => 'tiny',
'description' => 'Boolean for whether the message has already been sent in a digest or not.',
),
'timestamp' => array(
'description' => 'When the message instance was recorded.',
'type' => 'int',
'not null' => TRUE,
'unsigned' => TRUE,
'default' => 0,
),
),
'primary key' => array(
'id',
),
);
return $schema;
}