You are here

ip_ranges.install in IP Ranges 7

Same filename and directory in other branches
  1. 8 ip_ranges.install
  2. 7.2 ip_ranges.install

Install functions for the ip_ranges module.

File

ip_ranges.install
View source
<?php

/**
 * @file
 * Install functions for the ip_ranges module.
 */

/**
 * Implements hook_schema().
 */
function ip_ranges_schema() {
  $schema['ip_ranges'] = array(
    'fields' => array(
      'bid' => array(
        'type' => 'serial',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
      'ip' => array(
        'type' => 'varchar',
        'length' => 31,
        'not null' => TRUE,
        'default' => '',
      ),
      'type' => array(
        'type' => 'varchar',
        'length' => 9,
        'not null' => TRUE,
        'default' => '',
      ),
    ),
    'primary key' => array(
      'bid',
    ),
    'indexes' => array(
      'bid' => array(
        'bid',
      ),
      'type' => array(
        'type',
      ),
    ),
  );
  return $schema;
}

Functions

Namesort descending Description
ip_ranges_schema Implements hook_schema().