function maillog_schema in Maillog / Mail Developer 8
Same name and namespace in other branches
- 6 maillog.install \maillog_schema()
- 7 maillog.install \maillog_schema()
Implements hook_schema().
File
- ./
maillog.install, line 36 - Provides the installation and update routines for the Maillog module.
Code
function maillog_schema() {
$schema['maillog'] = [
'description' => "Stores outgoing emails that are captured using the Maillog module.",
'fields' => [
'id' => [
'type' => 'serial',
'unsigned' => TRUE,
'not null' => TRUE,
'description' => "The primary key of this table.",
],
'header_message_id' => [
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
'description' => "The 'message-id' field of the e-mail.",
],
'header_from' => [
'type' => 'text',
'not null' => TRUE,
'description' => "The 'From' field of the e-mail.",
],
'header_to' => [
'type' => 'text',
'not null' => TRUE,
'description' => "The 'To' field of the e-mail.",
],
'header_reply_to' => [
'type' => 'text',
'not null' => TRUE,
'description' => "The 'Reply-To' field of the e-mail.",
],
'header_all' => [
'type' => 'text',
'not null' => TRUE,
'description' => "The 'Header' field of the e-mail.",
],
'subject' => [
'description' => "The 'Subject' field of the e-mail.",
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
],
'body' => [
'description' => 'The body of this message.',
'type' => 'text',
'not null' => TRUE,
'size' => 'big',
],
'sent_date' => [
'description' => 'The Unix timestamp when the mail was sent.',
'type' => 'int',
'not null' => TRUE,
'default' => 0,
],
],
'primary key' => [
'id',
],
];
return $schema;
}