You are here

function ip_ranges_schema in IP Ranges 7

Same name and namespace in other branches
  1. 8 ip_ranges.install \ip_ranges_schema()
  2. 7.2 ip_ranges.install \ip_ranges_schema()

Implements hook_schema().

File

./ip_ranges.install, line 10
Install functions for the ip_ranges module.

Code

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;
}