function honeypot_schema in Honeypot 8
Same name and namespace in other branches
- 6 honeypot.install \honeypot_schema()
- 7 honeypot.install \honeypot_schema()
- 2.0.x honeypot.install \honeypot_schema()
Implements hook_schema().
1 call to honeypot_schema()
- honeypot_update_8100 in ./
honeypot.install - Adds the 'hostname' column to the {honeypot_user} table.
File
- ./
honeypot.install, line 13 - Contains install and update functions for Honeypot.
Code
function honeypot_schema() {
$schema['honeypot_user'] = [
'description' => 'Table that stores failed attempts to submit a form.',
'fields' => [
'uid' => [
'description' => 'Foreign key to {users}.uid; uniquely identifies a Drupal user to whom this ACL data applies.',
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
],
'hostname' => [
'type' => 'varchar',
'length' => 128,
'not null' => TRUE,
'description' => 'Hostname of user that that triggered honeypot.',
],
'timestamp' => [
'description' => 'Date/time when the form submission failed, as Unix timestamp.',
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
],
],
'indexes' => [
'uid' => [
'uid',
],
'timestamp' => [
'timestamp',
],
],
];
return $schema;
}