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

function dblog_schema() {
  $schema['watchdog'] = array(
    'fields' => array(
      'wid'       => array('type' => 'serial', 'not null' => TRUE),
      'uid'       => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
      'type'      => array('type' => 'varchar', 'length' => 16, 'not null' => TRUE, 'default' => ''),
      'message'   => array('type' => 'text', 'not null' => TRUE, 'size' => 'medium'),
      'variables' => array('type' => 'text', 'not null' => TRUE, 'size' => 'medium'),
      'severity'  => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0, 'size' => 'tiny'),
      'link'      => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
      'location'  => array('type' => 'text', 'not null' => TRUE),
      'referer'   => array('type' => 'varchar', 'length' => 128, 'not null' => TRUE, 'default' => ''),
      'hostname'  => array('type' => 'varchar', 'length' => 128, 'not null' => TRUE, 'default' => ''),
      'timestamp' => array('type' => 'int', 'not null' => TRUE, 'default' => 0)
    ),
    'primary key' => array('wid'),
    'indexes' => array('type' => array('type')),
  );

  return $schema;
}