function system_update_7002
7.x system.install | system_update_7002() |
Add a table to store blocked IP addresses.
Related topics
File
- drupal-7.x/
modules/ system/ system.install, line 1781 - Install, update and uninstall functions for the system module.
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']);
}