function uiplog_schema in User IP Log 8
Same name and namespace in other branches
- 6 uiplog.install \uiplog_schema()
- 7 uiplog.install \uiplog_schema()
- 9.1.x uiplog.install \uiplog_schema()
Implements hook_schema().
File
- ./
uiplog.install, line 12 - Install, update and uninstall functions for the uiplog module.
Code
function uiplog_schema() {
$schema['uiplog'] = array(
'description' => 'Logs users IP to db table on user login.',
'fields' => array(
'lid' => array(
'type' => 'serial',
'unsigned' => TRUE,
'not null' => TRUE,
'description' => 'Unique ID.',
),
'uid' => array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,
'description' => 'Maps to uid in user table.',
),
'ip' => array(
'type' => 'varchar',
'length' => 40,
'not null' => TRUE,
'description' => 'IP address of logged in users.',
),
'timestamp' => array(
'type' => 'int',
'not null' => TRUE,
'description' => 'Time of login.',
),
),
'indexes' => array(
'uid' => array(
'uid',
),
'ip' => array(
'ip',
),
),
'primary key' => array(
'lid',
),
);
return $schema;
}