You are here

function honeypot_update_6200 in Honeypot 6

Add {honeypot_users} database table.

File

./honeypot.install, line 81
Install, update and uninstall functions for the Honeypot module.

Code

function honeypot_update_6200() {
  $ret = array();
  $table = array(
    'description' => 'Table that stores failed attempts to submit a form.',
    'fields' => array(
      'uid' => array(
        'description' => 'Foreign key to {users}.uid; uniquely identifies a Drupal user to whom this ACL data applies.',
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
      'timestamp' => array(
        'description' => 'Date/time when the form submission failed, as Unix timestamp.',
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
    ),
    'indexes' => array(
      'uid' => array(
        'uid',
      ),
      'timestamp' => array(
        'timestamp',
      ),
    ),
  );
  db_create_table($ret, 'honeypot_user', $table);
  return $ret;
}