You are here

devel_mail_logger.install in Devel Mail Logger 7

Same filename and directory in other branches
  1. 8 devel_mail_logger.install

File

devel_mail_logger.install
View source
<?php

/**
 * Install file for devel_mail_logger.
 */

/**
 * Implements hook_schema().
 */
function devel_mail_logger_schema() {
  $schema = array();
  $schema['devel_mail_logger'] = array(
    'description' => 'Table for storing debug mails.',
    'fields' => array(
      'id' => array(
        'description' => 'The mail identifier.',
        'type' => 'serial',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
      'timestamp' => array(
        'description' => 'The Unix timestamp when the mail was saved.',
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
      ),
      'recipient' => array(
        'description' => 'The mail to.',
        'type' => 'varchar',
        'length' => '255',
        'not null' => TRUE,
        'default' => '',
      ),
      'subject' => array(
        'description' => 'The mail subject.',
        'type' => 'varchar',
        'length' => '255',
        'not null' => TRUE,
        'default' => '',
      ),
      'message' => array(
        'description' => 'The mail array from drupal.',
        'type' => 'text',
        'size' => 'big',
        'not null' => TRUE,
      ),
    ),
    'primary key' => array(
      'id',
    ),
  );
  return $schema;
}

/**
 * Implements hook_install().
 */
function devel_mail_logger_install() {
  db_query("UPDATE {system} SET weight = 100 WHERE name = 'devel_mail_logger'");
}

Functions