function rules_scheduler_schema

Implements hook_schema().

File

rules_scheduler/rules_scheduler.install, line 11

Code

function rules_scheduler_schema() {
    $schema['rules_scheduler'] = array(
        'description' => 'Stores scheduled tasks.',
        'fields' => array(
            'tid' => array(
                'type' => 'serial',
                'unsigned' => TRUE,
                'not null' => TRUE,
                'description' => "The scheduled task's id.",
            ),
            'config' => array(
                'type' => 'varchar',
                'length' => '64',
                'default' => '',
                'not null' => TRUE,
                'description' => "The scheduled configuration's name.",
            ),
            'date' => array(
                'description' => 'The Unix timestamp of when the task is to be scheduled.',
                'type' => 'int',
                'not null' => TRUE,
            ),
            'data' => array(
                'type' => 'blob',
                'size' => 'big',
                'not null' => FALSE,
                'serialize' => TRUE,
                'description' => 'The whole, serialized evaluation data.',
            ),
            'identifier' => array(
                'type' => 'varchar',
                'length' => '255',
                'default' => '',
                'not null' => FALSE,
                'description' => 'The user defined string identifying this task.',
            ),
            'handler' => array(
                'type' => 'varchar',
                'length' => '255',
                'not null' => FALSE,
                'description' => 'The fully-qualified class name of the queue item handler.',
            ),
        ),
        'primary key' => array(
            'tid',
        ),
        'indexes' => array(
            'date' => array(
                'date',
            ),
        ),
        'unique key' => array(
            'id' => array(
                'config',
                'identifier',
            ),
        ),
    );
    return $schema;
}