You are here

function prev_next_schema in Previous/Next API 7.2

Same name and namespace in other branches
  1. 8.2 prev_next.install \prev_next_schema()
  2. 6 prev_next.install \prev_next_schema()
  3. 7 prev_next.install \prev_next_schema()

Implements hook_schema().

File

./prev_next.install, line 34
The (un)install and update code for the prev_next module.

Code

function prev_next_schema() {
  $schema['prev_next_node'] = array(
    'description' => 'Prev/Next node',
    'fields' => array(
      'prev_nid' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
      'nid' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
      'next_nid' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
      'changed' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
    ),
    'primary key' => array(
      'nid',
    ),
    'indexes' => array(
      'prev_nid' => array(
        'prev_nid',
      ),
      'next_nid' => array(
        'next_nid',
      ),
    ),
  );
  return $schema;
}