~spreadubuntu/spreadubuntu/devel-drupal6

« back to all changes in this revision

Viewing changes to sites/all/modules/download_count/download_count.install

  • Committer: ruben
  • Date: 2009-06-08 09:38:49 UTC
  • Revision ID: ruben@captive-20090608093849-s1qtsyctv2vwp1x1
SpreadUbuntu moving to Drupal6. Based on ubuntu-drupal theme and adding our modules

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?php
 
2
// $Id: download_count.install,v 1.2.2.1 2008/01/11 01:42:14 chill35 Exp $
 
3
 
 
4
/**
 
5
 * Implementation of hook_install().
 
6
 */
 
7
 
 
8
function download_count_install() {
 
9
  // Create tables.
 
10
  drupal_install_schema('download_count');
 
11
}
 
12
 
 
13
/**
 
14
 * Implementation of hook_schema().
 
15
 */
 
16
function download_count_schema() {
 
17
 
 
18
$schema['file_downloads'] = array(
 
19
    'fields' => array(
 
20
         'filename' => array('type' => 'varchar', 'length' => '255', 'not null' => 1),
 
21
         'timestamp' => array('type' => 'int', 'not null' => 1, 'default' => 0, 'disp-width' => '11'),
 
22
         'count' => array('type' => 'int', 'not null' => 1, 'default' => 0, 'disp-width' => '11')),
 
23
    'unique keys' => array(
 
24
         'filename' => array('filename')),
 
25
);
 
26
 
 
27
  return $schema;
 
28
 
 
29
}
 
30
 
 
31
/**
 
32
 * Implementation of hook_uninstall().
 
33
 */
 
34
function download_count_uninstall() {
 
35
  // Remove tables.
 
36
  drupal_uninstall_schema('download_count');
 
37
}
 
 
b'\\ No newline at end of file'