webform_email_reply.install in Webform Email Reply 7.2
Same filename and directory in other branches
Webform email reply module schema hook.
File
webform_email_reply.installView source
<?php
/**
 * @file
 * Webform email reply module schema hook.
 */
/**
 * Implements hook_schema().
 */
function webform_email_reply_schema() {
  $schema = array();
  $schema['webform_email_reply'] = array(
    'description' => 'Holds information about emails sent in reply to submissions.',
    'fields' => array(
      'eid' => array(
        'description' => 'The unique identifier for the email.',
        'type' => 'serial',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
      'sid' => array(
        'description' => 'The unique identifier for the submission.',
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
      'nid' => array(
        'description' => 'The node identifier of a webform.',
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ),
      'uid' => array(
        'description' => 'The id of the user that replied to the submission',
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ),
      'replied' => array(
        'description' => 'Timestamp of when the reply was sent',
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
      ),
      'message' => array(
        'description' => 'The message text that was sent',
        'type' => 'text',
      ),
    ),
    'primary key' => array(
      'eid',
    ),
  );
  $schema['webform_email_reply_emails'] = array(
    'description' => 'Holds the default email to send a reply to in each webform.',
    'fields' => array(
      'nid' => array(
        'description' => 'The node identifier of a webform.',
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ),
      'cid' => array(
        'description' => 'The id of the component to use as the default email.',
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ),
    ),
    'primary key' => array(
      'nid',
    ),
  );
  return $schema;
}
/**
 * Add emai_format field to webform_email_reply table.
 */
function webform_email_reply_update_7100() {
  $spec = array(
    'description' => 'The {filter_format}.format of the email reply.',
    'type' => 'varchar',
    'length' => 255,
    'not null' => FALSE,
  );
  db_add_field('webform_email_reply', 'email_format', $spec);
}Functions
| Name   | Description | 
|---|---|
| webform_email_reply_schema | Implements hook_schema(). | 
| webform_email_reply_update_7100 | Add emai_format field to webform_email_reply table. | 
