You are here

function scheduler_schema in Scheduler 7

Same name and namespace in other branches
  1. 6 scheduler.install \scheduler_schema()

Implements hook_schema().

File

./scheduler.install, line 11
Installation file for Scheduler module.

Code

function scheduler_schema() {
  return array(
    'scheduler' => array(
      'description' => 'The main table to hold the scheduler data.',
      'fields' => array(
        'nid' => array(
          'description' => 'The foreign key to node.nid',
          'type' => 'int',
          'unsigned' => TRUE,
          'not null' => TRUE,
        ),
        'publish_on' => array(
          'description' => 'The UNIX UTC timestamp when to publish',
          'type' => 'int',
          'unsigned' => TRUE,
          'not null' => TRUE,
          'default' => 0,
        ),
        'unpublish_on' => array(
          'description' => 'The UNIX UTC timestamp when to unpublish',
          'type' => 'int',
          'unsigned' => TRUE,
          'not null' => TRUE,
          'default' => 0,
        ),
      ),
      'indexes' => array(
        'scheduler_publish_on' => array(
          'publish_on',
        ),
        'scheduler_unpublish_on' => array(
          'unpublish_on',
        ),
      ),
      'primary key' => array(
        'nid',
      ),
    ),
  );
}