function ip_ranges_schema in IP Ranges 8
Same name and namespace in other branches
- 7.2 ip_ranges.install \ip_ranges_schema()
- 7 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,
'description' => 'Primary Key: Unique ip range ID.',
),
'uuid' => array(
'description' => 'Unique Key: Universally unique identifier for this entity.',
'type' => 'varchar',
'length' => 128,
'not null' => FALSE,
),
'ip_lower' => array(
'type' => 'int',
'unsigned' => TRUE,
'length' => 15,
'not null' => TRUE,
),
'ip_higher' => array(
'type' => 'int',
'unsigned' => TRUE,
'length' => 15,
'not null' => TRUE,
),
'type' => array(
'type' => 'varchar',
'length' => 9,
'not null' => TRUE,
'default' => '',
),
'description' => array(
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
),
),
'unique keys' => array(
'uuid' => array(
'uuid',
),
),
'primary key' => array(
'bid',
),
'indexes' => array(
'bid' => array(
'bid',
),
'type' => array(
'type',
),
),
);
return $schema;
}