You are here

event_log_track.install in Events Log Track 8

Same filename and directory in other branches
  1. 8.2 event_log_track.install

Install, update and uninstall functions for the event_log_track module.

File

event_log_track.install
View source
<?php

/**
 * @file
 * Install, update and uninstall functions for the event_log_track module.
 */

/**
 * Implements hook_schema().
 */
function event_log_track_schema() {
  $schema['event_log_track'] = array(
    'description' => 'Logged events by the event_log_track module.',
    'fields' => array(
      'lid' => array(
        'description' => 'Log id.',
        'type' => 'serial',
        'not null' => TRUE,
      ),
      'type' => array(
        'description' => 'Event handler type.',
        'type' => 'varchar',
        'length' => '50',
        'not null' => TRUE,
      ),
      'operation' => array(
        'description' => 'The operation performed.',
        'type' => 'varchar',
        'length' => '50',
        'not null' => TRUE,
      ),
      'path' => array(
        'type' => 'varchar',
        'length' => '255',
        'not null' => TRUE,
        'default' => '',
        'description' => 'Current path.',
      ),
      'ref_numeric' => array(
        'description' => 'A numeric value that can be used to reference an object.',
        'type' => 'int',
        'not null' => FALSE,
      ),
      'ref_char' => array(
        'description' => 'A character value that can be used to reference an object.',
        'type' => 'varchar',
        'length' => '50',
        'not null' => FALSE,
      ),
      'description' => array(
        'description' => 'Description of the event, in HTML.',
        'type' => 'text',
        'size' => 'medium',
        'not null' => TRUE,
      ),
      'uid' => array(
        'description' => 'User id that triggered this event (0 = anonymous user).',
        'type' => 'int',
        'not null' => TRUE,
      ),
      'ip' => array(
        'description' => 'IP address of the visitor that triggered this event.',
        'type' => 'varchar',
        'length' => '255',
        'not null' => FALSE,
      ),
      'created' => array(
        'description' => 'The event timestamp.',
        'type' => 'int',
        'not null' => TRUE,
      ),
    ),
    'primary key' => array(
      'lid',
    ),
    'indexes' => array(
      'created' => array(
        'created',
      ),
      'user' => array(
        'uid',
        'ip',
      ),
      'ip' => array(
        'ip',
      ),
      'join' => array(
        'type',
        'operation',
        'ref_numeric',
        'ref_char',
      ),
    ),
  );
  return $schema;
}

Functions

Namesort descending Description
event_log_track_schema Implements hook_schema().