function login_security_schema in Login Security 7
Same name and namespace in other branches
- 8 login_security.install \login_security_schema()
- 6 login_security.install \login_security_schema()
- 2.x login_security.install \login_security_schema()
Implements hook_schema().
File
- ./
login_security.install, line 11 - Login Security installation routines.
Code
function login_security_schema() {
$schema['login_security_track'] = array(
'description' => 'Keeps track of failed login attempts, as a pair of the IP address and user name.',
'fields' => array(
'id' => array(
'type' => 'serial',
'not null' => TRUE,
'description' => "ID of each login event.",
),
'host' => array(
'type' => 'varchar',
'length' => 39,
'not null' => TRUE,
'default' => '',
'description' => "The IP address of the request.",
),
'name' => array(
'type' => 'varchar',
'length' => 64,
'not null' => TRUE,
'default' => '',
'description' => "Clean username, submitted using the login form.",
),
'timestamp' => array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,
'description' => "Timestamp of the event.",
),
),
'indexes' => array(
'name' => array(
'name',
),
'host' => array(
'host',
),
'timestamp' => array(
'timestamp',
),
),
'primary key' => array(
'id',
),
);
return $schema;
}