function system_update_7002
Add a table to store blocked IP addresses.
Related topics
File
-
modules/
system/ system.install, line 1910
Code
function system_update_7002() {
$schema['blocked_ips'] = array(
'description' => 'Stores blocked 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',
'length' => 32,
'not null' => TRUE,
'default' => '',
),
),
'indexes' => array(
'blocked_ip' => array(
'ip',
),
),
'primary key' => array(
'iid',
),
);
db_create_table('blocked_ips', $schema['blocked_ips']);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.