function download_count_schema in Download Count 7.2
Same name and namespace in other branches
- 8 download_count.install \download_count_schema()
- 6.2 download_count.install \download_count_schema()
- 6 download_count.install \download_count_schema()
- 7.3 download_count.install \download_count_schema()
Implements hook_schema().
File
- ./
download_count.install, line 11 - Installation code for the download_count module.
Code
function download_count_schema() {
$schema['download_count'] = array(
'description' => 'TODO',
'fields' => array(
'dcid' => array(
'description' => 'Primary Key: Unique download count id.',
'type' => 'serial',
'not null' => TRUE,
),
'fid' => array(
'description' => 'The id from the drupal files table of the file downloaded.',
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
'nid' => array(
'description' => 'The nid of the node to which the downloaded file was attached when it was downloaded.',
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
'uid' => array(
'description' => 'The uid of the user that downloaded the file.',
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
'vid' => array(
'description' => 'The vid of the node revision to which the downloaded file was attached when it was downloaded.',
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
'ip_address' => array(
'type' => 'varchar',
'length' => 128,
'not null' => TRUE,
'default' => NULL,
'description' => "The ip address of the downloading user.",
),
'referrer' => array(
'type' => 'text',
'not null' => TRUE,
'description' => 'Referrer URI.',
),
'timestamp' => array(
'description' => 'The date-time the file was downloaded.',
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
),
'primary key' => array(
'dcid',
),
);
return $schema;
}