You are here

function jplayer_protect_schema in jPlayer 7.2

Same name and namespace in other branches
  1. 6 jplayer_protect/jplayer_protect.install \jplayer_protect_schema()

Implements hook_schema().

File

jplayer_protect/jplayer_protect.install, line 11
Installation hooks for the jplayer_protect module.

Code

function jplayer_protect_schema() {
  $schema = array();
  $schema['jplayer_protect_denied'] = array(
    'description' => 'Contains user statistics for when a user is blocked from downloading a file.',
    'fields' => array(
      'did' => array(
        'description' => 'Primary Key: Unique denied event ID.',
        'type' => 'serial',
        'not null' => TRUE,
      ),
      'uid' => array(
        'description' => 'The user ID of the user.',
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
      ),
      'fid' => array(
        'description' => 'The file ID that was denied access.',
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
      ),
      'hostname' => array(
        'description' => 'The hostname of the user that was denied access.',
        'type' => 'varchar',
        'length' => 128,
        'not null' => TRUE,
        'default' => '',
      ),
      'timestamp' => array(
        'description' => 'The last time this user was denied access.',
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
      ),
    ),
    'primary key' => array(
      'did',
    ),
    'indexes' => array(
      'uid' => array(
        'uid',
      ),
      'fid' => array(
        'fid',
      ),
      'hostname' => array(
        'hostname',
      ),
      'timestamp' => array(
        'timestamp',
      ),
    ),
  );
  return $schema;
}