You are here

function webform_scheduler_schema in Webform Scheduler 7

Implements hook_schema().

File

./webform_scheduler.install, line 13
Webform Scheduler module install/schema hooks.

Code

function webform_scheduler_schema() {
  $schema = array();
  $schema['webform_scheduler'] = array(
    'description' => 'Table for storing the information for scheduling webforms.',
    'fields' => array(
      'nid' => array(
        'description' => 'The node identifier of a webform.',
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
      'begin_date' => array(
        'description' => 'Timestamp of when the webform is scheduled to begin.',
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
      ),
      'end_date' => array(
        'description' => 'Timestamp of when the webform is scheduled to end.',
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
      ),
      'restriction_method' => array(
        'description' => 'Method for restricting user access to closed webforms.',
        'type' => 'int',
        'size' => 'tiny',
        'unsigned' => TRUE,
        'default' => 1,
        'not null' => TRUE,
      ),
      'msg_before' => array(
        'description' => 'Message to display before the webform is scheduled to begin.',
        'type' => 'varchar',
        'length' => 128,
      ),
      'msg_after' => array(
        'description' => 'Message to display after the webform is scheduled to end.',
        'type' => 'varchar',
        'length' => 128,
      ),
    ),
    'primary key' => array(
      'nid',
    ),
  );
  return $schema;
}