message_history-8.x-1.x-dev/message_history.install
message_history.install
<?php
/**
* @file
* Installation functions for Message History module.
*/
/**
* Implements hook_schema().
*/
function message_history_schema() {
$schema['message_history'] = [
'description' => 'A record of which {users} have read which {message}s.',
'fields' => [
'uid' => [
'description' => 'The {users}.uid that read the {message} mid.',
'type' => 'int',
'not null' => TRUE,
'default' => 0,
],
'mid' => [
'description' => 'The {message}.mid that was read.',
'type' => 'int',
'unsigned' => TRUE,
'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', 'mid'],
'indexes' => [
'mid' => ['mid'],
],
];
return $schema;
}
