comparison modules/statistics/statistics.install @ 19:3edae6ecd6c6 6.9

Drupal 6.9
author Franck Deroche <franck@defr.org>
date Thu, 15 Jan 2009 10:15:56 +0100
parents c1f4ac30525a
children
comparison
equal deleted inserted replaced
18:f5131a9cd9e5 19:3edae6ecd6c6
1 <?php 1 <?php
2 // $Id: statistics.install,v 1.13 2007/12/18 12:59:22 dries Exp $ 2 // $Id: statistics.install,v 1.13.2.1 2009/01/06 15:46:37 goba Exp $
3 3
4 /** 4 /**
5 * Implementation of hook_install(). 5 * Implementation of hook_install().
6 */ 6 */
7 function statistics_install() { 7 function statistics_install() {
47 /** 47 /**
48 * Implementation of hook_schema(). 48 * Implementation of hook_schema().
49 */ 49 */
50 function statistics_schema() { 50 function statistics_schema() {
51 $schema['accesslog'] = array( 51 $schema['accesslog'] = array(
52 'description' => t('Stores site access information for statistics.'), 52 'description' => 'Stores site access information for statistics.',
53 'fields' => array( 53 'fields' => array(
54 'aid' => array( 54 'aid' => array(
55 'type' => 'serial', 55 'type' => 'serial',
56 'not null' => TRUE, 56 'not null' => TRUE,
57 'description' => t('Primary Key: Unique accesslog ID.'), 57 'description' => 'Primary Key: Unique accesslog ID.',
58 ), 58 ),
59 'sid' => array( 59 'sid' => array(
60 'type' => 'varchar', 60 'type' => 'varchar',
61 'length' => 64, 61 'length' => 64,
62 'not null' => TRUE, 62 'not null' => TRUE,
63 'default' => '', 63 'default' => '',
64 'description' => t('Browser session ID of user that visited page.'), 64 'description' => 'Browser session ID of user that visited page.',
65 ), 65 ),
66 'title' => array( 66 'title' => array(
67 'type' => 'varchar', 67 'type' => 'varchar',
68 'length' => 255, 68 'length' => 255,
69 'not null' => FALSE, 69 'not null' => FALSE,
70 'description' => t('Title of page visited.'), 70 'description' => 'Title of page visited.',
71 ), 71 ),
72 'path' => array( 72 'path' => array(
73 'type' => 'varchar', 73 'type' => 'varchar',
74 'length' => 255, 74 'length' => 255,
75 'not null' => FALSE, 75 'not null' => FALSE,
76 'description' => t('Internal path to page visited (relative to Drupal root.)'), 76 'description' => 'Internal path to page visited (relative to Drupal root.)',
77 ), 77 ),
78 'url' => array( 78 'url' => array(
79 'type' => 'varchar', 79 'type' => 'varchar',
80 'length' => 255, 80 'length' => 255,
81 'not null' => FALSE, 81 'not null' => FALSE,
82 'description' => t('Referrer URI.'), 82 'description' => 'Referrer URI.',
83 ), 83 ),
84 'hostname' => array( 84 'hostname' => array(
85 'type' => 'varchar', 85 'type' => 'varchar',
86 'length' => 128, 86 'length' => 128,
87 'not null' => FALSE, 87 'not null' => FALSE,
88 'description' => t('Hostname of user that visited the page.'), 88 'description' => 'Hostname of user that visited the page.',
89 ), 89 ),
90 'uid' => array( 90 'uid' => array(
91 'type' => 'int', 91 'type' => 'int',
92 'unsigned' => TRUE, 92 'unsigned' => TRUE,
93 'not null' => FALSE, 93 'not null' => FALSE,
94 'default' => 0, 94 'default' => 0,
95 'description' => t('User {users}.uid that visited the page.'), 95 'description' => 'User {users}.uid that visited the page.',
96 ), 96 ),
97 'timer' => array( 97 'timer' => array(
98 'type' => 'int', 98 'type' => 'int',
99 'unsigned' => TRUE, 99 'unsigned' => TRUE,
100 'not null' => TRUE, 100 'not null' => TRUE,
101 'default' => 0, 101 'default' => 0,
102 'description' => t('Time in milliseconds that the page took to load.'), 102 'description' => 'Time in milliseconds that the page took to load.',
103 ), 103 ),
104 'timestamp' => array( 104 'timestamp' => array(
105 'type' => 'int', 105 'type' => 'int',
106 'unsigned' => TRUE, 106 'unsigned' => TRUE,
107 'not null' => TRUE, 107 'not null' => TRUE,
108 'default' => 0, 108 'default' => 0,
109 'description' => t('Timestamp of when the page was visited.'), 109 'description' => 'Timestamp of when the page was visited.',
110 ), 110 ),
111 ), 111 ),
112 'indexes' => array( 112 'indexes' => array(
113 'accesslog_timestamp' => array('timestamp'), 113 'accesslog_timestamp' => array('timestamp'),
114 'uid' => array('uid'), 114 'uid' => array('uid'),