You are here

function download_count_statistics_schema in Download Count 6.2

Implementation of hook_schema().

File

./download_count_statistics.install, line 11
Installation code for the download_count_statistics module.

Code

function download_count_statistics_schema() {
  $schema['download_count_statistics'] = array(
    'description' => t('Table used for download_count module statistics.'),
    'fields' => array(
      'fid' => array(
        'description' => t('The id from the drupal files table of the file downloaded.'),
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ),
      'datestamp' => array(
        'description' => t('The date the file was downloaded.'),
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ),
      'count' => array(
        'description' => t('Number of times a file was downloaded in one day.'),
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ),
    ),
    'primary key' => array(
      'fid',
      'datestamp',
    ),
  );
  return $schema;
}