You are here

prev_next.install in Previous/Next API 8.2

Same filename and directory in other branches
  1. 6 prev_next.install
  2. 7.2 prev_next.install
  3. 7 prev_next.install

The (un)install and update code for the prev_next module.

File

prev_next.install
View source
<?php

/**
 * @file
 * The (un)install and update code for the prev_next module.
 */

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

Functions

Namesort descending Description
prev_next_schema Implements hook_schema().