You are here

function mass_contact_schema in Mass Contact 6

Same name and namespace in other branches
  1. 7 mass_contact.install \mass_contact_schema()

Implementation of hook_schema().

File

./mass_contact.install, line 13
This is the un/install file for the Mass Contact module.

Code

function mass_contact_schema() {
  $schema['mass_contact'] = array(
    'description' => t('The base table for nodes.'),
    'fields' => array(
      'cid' => array(
        'description' => t('The primary id field for the category table.'),
        'type' => 'serial',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
      'category' => array(
        'description' => t('The name of the category.'),
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'default' => '',
      ),
      'recipients' => array(
        'description' => t('A list of the users to receive the message.'),
        'type' => 'text',
        'size' => 'big',
        'not null' => TRUE,
      ),
      'reply' => array(
        'description' => t('.'),
        'type' => 'text',
        'size' => 'big',
        'not null' => TRUE,
      ),
      'weight' => array(
        'description' => t('.'),
        'type' => 'int',
        'size' => 'tiny',
        'unsigned' => FALSE,
        'not null' => TRUE,
        'default' => 0,
      ),
      'selected' => array(
        'description' => t('.'),
        'type' => 'int',
        'size' => 'tiny',
        'unsigned' => FALSE,
        'not null' => TRUE,
        'default' => 0,
      ),
    ),
    'primary key' => array(
      'cid',
    ),
    'unique keys' => array(
      'category' => array(
        'category',
      ),
    ),
  );
  return $schema;
}