You are here

function spambot_schema in Spambot 7

Same name and namespace in other branches
  1. 8 spambot.install \spambot_schema()
  2. 6.3 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'] = array(
    'description' => 'Node table to track author IP addresses. For use by spambot only.',
    'fields' => array(
      'nid' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ),
      'uid' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ),
      'hostname' => array(
        'type' => 'varchar',
        'length' => 128,
        'not null' => FALSE,
      ),
    ),
    'primary key' => array(
      'nid',
    ),
    'indexes' => array(
      'uid' => array(
        'uid',
      ),
    ),
  );
  $schema['cache_spambot'] = drupal_get_schema_unprocessed('system', 'cache');
  $schema['cache_spambot']['description'] = 'Cache table for the Spambot module to store responses from www.stopforumspam.com';
  return $schema;
}