function private_message_schema in Private Message 8.2
Implements hook_schema().
File
- ./
private_message.install, line 68 - Holds install and update hooks for the Private Message module.
Code
function private_message_schema() {
$schema['pm_thread_history'] = [
'description' => 'A record of which {users} have read which {node}s.',
'fields' => [
'uid' => [
'description' => 'The {users}.uid that read the {private_message_threads} id.',
'type' => 'int',
'not null' => TRUE,
'default' => 0,
],
'thread_id' => [
'description' => 'The {private_message_threads}.id that was read.',
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
],
'access_timestamp' => [
'description' => 'The Unix timestamp at which the read occurred.',
'type' => 'int',
'not null' => TRUE,
'default' => 0,
],
'delete_timestamp' => [
'description' => 'The Unix timestamp at which the delete occurred.',
'type' => 'int',
'not null' => TRUE,
'default' => 0,
],
],
'primary key' => [
'uid',
'thread_id',
],
'indexes' => [
'thread_id' => [
'thread_id',
],
],
];
return $schema;
}