You are here

function publication_date_schema in Publication Date 7

Same name and namespace in other branches
  1. 6 publication_date.install \publication_date_schema()
  2. 7.2 publication_date.install \publication_date_schema()

Implements hook_schema().

File

./publication_date.install, line 11
Installation functions for the Publication Date module.

Code

function publication_date_schema() {
  $schema['publication_date'] = array(
    'description' => 'Keep the publication timestamp for each node.',
    'fields' => array(
      'nid' => array(
        'description' => 'The {node}.nid of the node.',
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
      ),
      'published_at' => array(
        'description' => 'The timestamp of the node publication.',
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
      ),
    ),
    'indexes' => array(
      'published_at' => array(
        'published_at',
      ),
    ),
    'primary key' => array(
      'nid',
    ),
  );
  return $schema;
}