You are here

function workbench_email_schema in Workbench Email 7

Same name and namespace in other branches
  1. 7.3 workbench_email.install \workbench_email_schema()

Implements hook_schema().

File

./workbench_email.install, line 10
Install file for the Workbench Email module.

Code

function workbench_email_schema() {
  $schema = array();
  $schema['workbench_emails'] = array(
    'description' => 'Custom table to hold moderation emails',
    'fields' => array(
      'wid' => array(
        'type' => 'serial',
        'not null' => TRUE,
        'description' => 'An auto increment id',
      ),
      'from_name' => array(
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'description' => 'The from state that the email exists',
      ),
      'to_name' => array(
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'description' => 'The to state that this email exists',
      ),
      'rid' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
        'description' => 'The role id',
      ),
      'subject' => array(
        'type' => 'varchar',
        'length' => 255,
        'not null' => FALSE,
        'description' => 'The subject of the email',
      ),
      'message' => array(
        'description' => 'The message of the email',
        'type' => 'text',
        'not null' => FALSE,
        'size' => 'big',
        'translatable' => TRUE,
      ),
    ),
    'indexes' => array(
      'rid' => array(
        'rid',
      ),
    ),
    'primary key' => array(
      'wid',
    ),
  );
  return $schema;
}