You are here

function mail_safety_schema in Mail Safety 7.2

Same name and namespace in other branches
  1. 8 mail_safety.install \mail_safety_schema()
  2. 7 mail_safety.install \mail_safety_schema()

Implements hook_schema().

File

./mail_safety.install, line 12
Install, update, and uninstall functions for the Mail Safety module.

Code

function mail_safety_schema() {
  $schema = array();
  $schema['mail_safety_mail'] = array(
    'description' => 'The base table for mail safety mail entity.',
    'fields' => array(
      'mid' => array(
        'description' => 'Primary key of the mail safety mail entity.',
        'type' => 'serial',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
      'mail_body' => array(
        'description' => 'The body of the mail being sent',
        'type' => 'text',
        'size' => 'medium',
        'not null' => FALSE,
      ),
      'mail_subject' => array(
        'description' => 'The subject of the mail being sent',
        'type' => 'varchar',
        'length' => 255,
        'not null' => FALSE,
      ),
      'mail_to' => array(
        'description' => 'The mail address the mail is being sent to.',
        'type' => 'varchar',
        'length' => 255,
        'not null' => FALSE,
      ),
      'mail_cc' => array(
        'description' => 'The cc mail addresses the mail is being sent to.',
        'type' => 'varchar',
        'length' => 255,
        'not null' => FALSE,
      ),
      'mail_module' => array(
        'description' => 'The module of the mail being sent',
        'type' => 'varchar',
        'length' => 255,
        'not null' => FALSE,
        'default' => '',
      ),
      'mail_key' => array(
        'description' => 'The key of the mail being sent',
        'type' => 'varchar',
        'length' => 255,
        'not null' => FALSE,
      ),
      'mail_serialized' => array(
        'description' => 'The serialized mail safety mail',
        'type' => 'text',
        'size' => 'big',
        'not null' => FALSE,
      ),
      'created' => array(
        'description' => 'The Unix timestamp of the time the mail entity got created.',
        'type' => 'int',
        'not null' => FALSE,
      ),
      'sent' => array(
        'description' => 'The Unix timestamp of the time the mail got sent.',
        'type' => 'int',
        'not null' => FALSE,
      ),
    ),
    'primary key' => array(
      'mid',
    ),
  );
  return $schema;
}