function download_count_schema in Download Count 6.2
Same name and namespace in other branches
- 8 download_count.install \download_count_schema()
- 6 download_count.install \download_count_schema()
- 7.3 download_count.install \download_count_schema()
- 7.2 download_count.install \download_count_schema()
Implementation of hook_schema().
File
- ./
download_count.install, line 18 - Installation code for the download_count module.
Code
function download_count_schema() {
$schema['download_count'] = array(
'description' => t('TODO'),
'fields' => array(
'dcid' => array(
'description' => 'Primary Key: Unique download count id.',
'type' => 'serial',
'not null' => TRUE,
),
'fid' => array(
'description' => t('The id from the drupal files table of the file downloaded.'),
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
'nid' => array(
'description' => t('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' => t('The uid of the user that downloaded the file.'),
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
'vid' => array(
'description' => t('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' => t('The date-time the file was downloaded.'),
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
),
'primary key' => array(
'dcid',
),
);
return $schema;
}