message_thread_history-8.x-1.0/message_thread_history.install
message_thread_history.install
<?php
/**
* @file
* Installation functions for Message History module.
*/
/**
* Implements hook_schema().
*/
function message_thread_history_schema() {
$schema['message_thread_history'] = [
'description' => 'A record of which {users} have read which {message thread}s.',
'fields' => [
'uid' => [
'description' => 'The {users}.uid that read the {message thread} thread id.',
'type' => 'int',
'not null' => TRUE,
'default' => 0,
],
'thread_id' => [
'description' => 'The {message thread}.thread id that was read.',
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
],
'mid' => [
'description' => 'The {message}.mid that was most recently created.',
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
],
'created' => [
'description' => 'The {message}.created timestamp of the most recent message.',
'type' => 'int',
'not null' => TRUE,
'default' => 0,
],
'timestamp' => [
'description' => 'The Unix timestamp at which the read occurred.',
'type' => 'int',
'not null' => TRUE,
'default' => 0,
],
],
'primary key' => ['uid', 'thread_id'],
'indexes' => [
'thread_id' => ['thread_id'],
'mid' => ['mid'],
],
];
return $schema;
}
