function prev_next_schema in Previous/Next API 8.2
Same name and namespace in other branches
- 6 prev_next.install \prev_next_schema()
- 7.2 prev_next.install \prev_next_schema()
- 7 prev_next.install \prev_next_schema()
Implements hook_schema().
File
- ./
prev_next.install, line 11 - The (un)install and update code for the prev_next module.
Code
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;
}