You are here

function pet_schema in Previewable email templates 6

Same name and namespace in other branches
  1. 7 pet.install \pet_schema()

Implementation of hook_schema().

File

./pet.install, line 55
Previewable E-mail Template module install/schema/update hooks.

Code

function pet_schema() {
  $schema = array();
  $schema['pets'] = array(
    'fields' => array(
      'pid' => array(
        'type' => 'serial',
        'size' => 'small',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
      'name' => array(
        'type' => 'varchar',
        'length' => '32',
        'not null' => FALSE,
        'default' => '',
      ),
      'title' => array(
        'type' => 'varchar',
        'length' => '255',
        'not null' => FALSE,
        'default' => '',
      ),
      'subject' => array(
        'type' => 'varchar',
        'length' => '255',
        'not null' => FALSE,
        'default' => '',
      ),
      'body' => array(
        'type' => 'text',
        'not null' => FALSE,
        'default' => '',
      ),
      'object_types' => array(
        'type' => 'text',
        'not null' => FALSE,
        'default' => '',
      ),
      'recipient_callback' => array(
        'type' => 'varchar',
        'length' => '255',
        'not null' => FALSE,
        'default' => '',
      ),
      'from_override' => array(
        'type' => 'varchar',
        'length' => '255',
        'not null' => FALSE,
        'default' => '',
      ),
      'cc_default' => array(
        'type' => 'text',
        'not null' => FALSE,
        'size' => 'medium',
        'default' => '',
      ),
      'bcc_default' => array(
        'type' => 'text',
        'not null' => FALSE,
        'size' => 'medium',
        'default' => '',
      ),
    ),
    'primary key' => array(
      'pid',
    ),
    'unique keys' => array(
      'name' => array(
        'name',
      ),
    ),
  );
  return $schema;
}