You are here

webform_digest.install in Webform Bonus Pack 6.3

Same filename and directory in other branches
  1. 7.3 modules/webform_digest/webform_digest.install

File

modules/webform_digest/webform_digest.install
View source
<?php

/**
 * Implementation of hook_schema().
 */
function webform_digest_schema() {
  $schema = array();
  $schema['webform_digest'] = array(
    'description' => 'Table for storing properties of Webform Digest module.',
    'fields' => array(
      'nid' => array(
        'description' => 'The node identifier of a webform.',
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
      'enabled' => array(
        'description' => 'Boolean value indicates if Webform Digest is enabled for a webform.',
        'type' => 'int',
        'size' => 'tiny',
        'not null' => TRUE,
        'default' => 0,
      ),
      'new_data' => array(
        'description' => 'Boolean value indicates if only new data since last email should be sent.',
        'type' => 'int',
        'size' => 'tiny',
        'not null' => TRUE,
        'default' => 0,
      ),
      'period' => array(
        'description' => 'Indicates how often digest should be sent.',
        'type' => 'text',
        'size' => 'tiny',
        'not null' => TRUE,
        'default' => '',
      ),
      'daily_granularity' => array(
        'description' => 'Day of week/month when digest should be sent.',
        'type' => 'int',
        'size' => 'small',
        'not null' => TRUE,
        'default' => 0,
      ),
      'hourly_granularity' => array(
        'description' => 'Hour when digest should be sent.',
        'type' => 'int',
        'size' => 'tiny',
        'not null' => TRUE,
        'default' => 0,
      ),
      'sent' => array(
        'description' => 'The Unix timestamp when the latest digest have been sent.',
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
      ),
      'settings' => array(
        'description' => 'Serialized $form_state of download form.',
        'type' => 'text',
        'size' => 'normal',
        'not null' => TRUE,
        'default' => '',
      ),
      'digest_settings' => array(
        'description' => 'Serialized digest settings.',
        'type' => 'text',
        'size' => 'normal',
        'not null' => TRUE,
        'default' => '',
      ),
      'body' => array(
        'description' => 'E-mail body.',
        'type' => 'text',
        'not null' => TRUE,
        'size' => 'normal',
      ),
    ),
    'indexes' => array(
      'webform_digest_sent' => array(
        'sent',
      ),
    ),
    'primary key' => array(
      'nid',
    ),
  );
  return $schema;
}

/**
 * Implementation of hook_install().
 */
function webform_digest_install() {
  drupal_install_schema('webform_digest');
}

/**
 * Implementation of hook_uninstall().
 */
function webform_digest_uninstall() {
  drupal_uninstall_schema('webform_digest');
}

Functions

Namesort descending Description
webform_digest_install Implementation of hook_install().
webform_digest_schema Implementation of hook_schema().
webform_digest_uninstall Implementation of hook_uninstall().