You are here

function spambot_schema in Spambot 8

Same name and namespace in other branches
  1. 6.3 spambot.install \spambot_schema()
  2. 7 spambot.install \spambot_schema()

Implements hook_schema().

File

./spambot.install, line 11
Install and update hooks for Spambot module.

Code

function spambot_schema() {
  $schema['node_spambot'] = [
    'description' => 'Node table to track author IP addresses. For use by spambot only.',
    'fields' => [
      'nid' => [
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ],
      'uid' => [
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ],
      'hostname' => [
        'type' => 'varchar',
        'length' => 128,
        'not null' => FALSE,
      ],
    ],
    'primary key' => [
      'nid',
    ],
    'indexes' => [
      'uid' => [
        'uid',
      ],
    ],
  ];
  return $schema;
}