You are here

function rules_scheduler_schema in Rules 6

Same name and namespace in other branches
  1. 7.2 rules_scheduler/rules_scheduler.install \rules_scheduler_schema()

Implementation of hook_schema().

File

rules_scheduler/rules_scheduler.install, line 26
Rules Scheduler - Installation file.

Code

function rules_scheduler_schema() {
  $schema['rules_scheduler'] = array(
    'description' => t('Stores a schedule for rule sets.'),
    'fields' => array(
      'tid' => array(
        'type' => 'serial',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'description' => t("The scheduled task's id."),
      ),
      'set_name' => array(
        'type' => 'varchar',
        'length' => '255',
        'default' => '',
        'not null' => TRUE,
        'description' => t("The scheduled rule set's name."),
      ),
      'date' => array(
        'type' => 'datetime',
        'not null' => TRUE,
        'description' => t('When the task is to be scheduled.'),
      ),
      'arguments' => array(
        'type' => 'text',
        'not null' => FALSE,
        'serialize' => TRUE,
        'description' => t('The whole, serialized item configuration.'),
      ),
      'identifier' => array(
        'type' => 'varchar',
        'length' => '255',
        'default' => '',
        'not null' => FALSE,
        'description' => t('The user defined string identifying this task.'),
      ),
    ),
    'primary key' => array(
      'tid',
    ),
    'indexes' => array(
      'date' => array(
        'date',
      ),
    ),
  );
  return $schema;
}