ban.install 743 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
<?php

/**
 * @file
 * Install, update and uninstall functions for the Ban module.
 */

/**
 * Implements hook_schema().
 */
function ban_schema() {
  $schema['ban_ip'] = array(
    'description' => 'Stores banned IP addresses.',
    'fields' => array(
      'iid' => array(
        'description' => 'Primary Key: unique ID for IP addresses.',
        'type' => 'serial',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
      'ip' => array(
        'description' => 'IP address',
23
        'type' => 'varchar_ascii',
24 25 26 27 28 29 30 31 32 33 34 35
        'length' => 40,
        'not null' => TRUE,
        'default' => '',
      ),
    ),
    'indexes' => array(
      'ip' => array('ip'),
    ),
    'primary key' => array('iid'),
  );
  return $schema;
}