summaryrefslogtreecommitdiff
path: root/modules/statistics/statistics.schema
blob: a866c0a5f781ca69f5cd4e180df6e836dccaaa4a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<?php
// $Id$

function statistics_schema() {
  $schema['accesslog'] = array(
    'fields' => array(
      'aid'       => array('type' => 'serial', 'not null' => TRUE),
      'sid'       => array('type' => 'varchar', 'length' => 64, 'not null' => TRUE, 'default' => ''),
      'title'     => array('type' => 'varchar', 'length' => 255, 'not null' => FALSE),
      'path'      => array('type' => 'varchar', 'length' => 255, 'not null' => FALSE),
      'url'       => array('type' => 'varchar', 'length' => 255, 'not null' => FALSE),
      'hostname'  => array('type' => 'varchar', 'length' => 128, 'not null' => FALSE),
      'uid'       => array('type' => 'int', 'unsigned' => TRUE, 'not null' => FALSE, 'default' => 0),
      'timer'     => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
      'timestamp' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0)
    ),
    'indexes' => array('accesslog_timestamp' => array('timestamp')),
    'primary key' => array('aid'),
  );

  return $schema;
}