You are here

ban.install in Zircon Profile 8

Same filename and directory in other branches
  1. 8.0 core/modules/ban/ban.install

Install, update and uninstall functions for the Ban module.

File

core/modules/ban/ban.install
View source
<?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',
        'type' => 'varchar_ascii',
        'length' => 40,
        'not null' => TRUE,
        'default' => '',
      ),
    ),
    'indexes' => array(
      'ip' => array(
        'ip',
      ),
    ),
    'primary key' => array(
      'iid',
    ),
  );
  return $schema;
}

Functions

Namesort descending Description
ban_schema Implements hook_schema().