You are here

pet.install in Previewable email templates 7

Same filename and directory in other branches
  1. 8.3 pet.install
  2. 6 pet.install

Previewable Email Template module install/schema/update hooks.

File

pet.install
View source
<?php

/**
 * @file
 * Previewable Email Template module install/schema/update hooks.
 */

/**
 * Implementation of hook_schema().
 */
function pet_schema() {
  $schema = array();
  $schema['pets'] = array(
    'description' => 'Base table for previewable email templates.',
    'fields' => array(
      'pid' => array(
        'type' => 'serial',
        'not null' => TRUE,
        'description' => 'The internal identifier for any template.',
      ),
      'name' => array(
        'type' => 'varchar',
        'length' => '64',
        'not null' => TRUE,
        'description' => 'The machine name of the template.',
      ),
      'status' => array(
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0x1,
        'size' => 'tiny',
        'description' => 'The exportable status of the entity.',
      ),
      'module' => array(
        'description' => 'The name of the providing module if the entity has been defined in code.',
        'type' => 'varchar',
        'length' => 255,
        'not null' => FALSE,
      ),
      'title' => array(
        'type' => 'varchar',
        'length' => '255',
        'not null' => TRUE,
        'description' => 'The human readable name of the template.',
        'default' => '',
      ),
      'subject' => array(
        'type' => 'varchar',
        'length' => '255',
        'not null' => FALSE,
        'description' => 'The template subject.',
        'default' => '',
      ),
      'mail_body' => array(
        'type' => 'text',
        'not null' => FALSE,
        'size' => 'big',
        'description' => 'The template body.',
      ),
      'mail_body_plain' => array(
        'type' => 'text',
        'not null' => FALSE,
        'size' => 'big',
        'description' => 'The template body in plain text form.',
      ),
      'send_plain' => array(
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0x0,
        'size' => 'tiny',
        'description' => 'If true send email as plain text.',
      ),
      'recipient_callback' => array(
        'type' => 'varchar',
        'length' => '255',
        'not null' => FALSE,
        'description' => 'A recipient callback function, if any.',
        'default' => '',
      ),
      'from_override' => array(
        'type' => 'varchar',
        'length' => '255',
        'not null' => FALSE,
        'description' => 'Email to override system from address.',
        'default' => '',
      ),
      'cc_default' => array(
        'type' => 'text',
        'not null' => FALSE,
        'size' => 'medium',
        'description' => 'Optional cc emails.',
      ),
      'bcc_default' => array(
        'type' => 'text',
        'not null' => FALSE,
        'size' => 'medium',
        'description' => 'Optional bcc emails.',
      ),
    ),
    'primary key' => array(
      'pid',
    ),
    'unique keys' => array(
      'name' => array(
        'name',
      ),
    ),
  );
  return $schema;
}

/**
 * Implementation of hook_uninstall().
 */
function pet_uninstall() {
}

Functions

Namesort descending Description
pet_schema Implementation of hook_schema().
pet_uninstall Implementation of hook_uninstall().