function jplayer_protect_schema in jPlayer 6
Same name and namespace in other branches
- 7.2 jplayer_protect/jplayer_protect.install \jplayer_protect_schema()
Implementation of 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;
}