Upgraded drupal core with security updates
[yaffs-website] / web / core / modules / dblog / dblog.install
1 <?php
2
3 /**
4  * @file
5  * Install, update and uninstall functions for the dblog module.
6  */
7
8 /**
9  * Implements hook_schema().
10  */
11 function dblog_schema() {
12   $schema['watchdog'] = [
13     'description' => 'Table that contains logs of all system events.',
14     'fields' => [
15       'wid' => [
16         'type' => 'serial',
17         'not null' => TRUE,
18         'description' => 'Primary Key: Unique watchdog event ID.',
19       ],
20       'uid' => [
21         'type' => 'int',
22         'unsigned' => TRUE,
23         'not null' => TRUE,
24         'default' => 0,
25         'description' => 'The {users}.uid of the user who triggered the event.',
26       ],
27       'type' => [
28         'type' => 'varchar_ascii',
29         'length' => 64,
30         'not null' => TRUE,
31         'default' => '',
32         'description' => 'Type of log message, for example "user" or "page not found."',
33       ],
34       'message' => [
35         'type' => 'text',
36         'not null' => TRUE,
37         'size' => 'big',
38         'description' => 'Text of log message to be passed into the t() function.',
39       ],
40       'variables' => [
41         'type' => 'blob',
42         'not null' => TRUE,
43         'size' => 'big',
44         'description' => 'Serialized array of variables that match the message string and that is passed into the t() function.',
45       ],
46       'severity' => [
47         'type' => 'int',
48         'unsigned' => TRUE,
49         'not null' => TRUE,
50         'default' => 0,
51         'size' => 'tiny',
52         'description' => 'The severity level of the event; ranges from 0 (Emergency) to 7 (Debug)',
53       ],
54       'link' => [
55         'type' => 'text',
56         'not null' => FALSE,
57         'description' => 'Link to view the result of the event.',
58       ],
59       'location'  => [
60         'type' => 'text',
61         'not null' => TRUE,
62         'description' => 'URL of the origin of the event.',
63       ],
64       'referer' => [
65         'type' => 'text',
66         'not null' => FALSE,
67         'description' => 'URL of referring page.',
68       ],
69       'hostname' => [
70         'type' => 'varchar_ascii',
71         'length' => 128,
72         'not null' => TRUE,
73         'default' => '',
74         'description' => 'Hostname of the user who triggered the event.',
75       ],
76       'timestamp' => [
77         'type' => 'int',
78         'not null' => TRUE,
79         'default' => 0,
80         'description' => 'Unix timestamp of when event occurred.',
81       ],
82     ],
83     'primary key' => ['wid'],
84     'indexes' => [
85       'type' => ['type'],
86       'uid' => ['uid'],
87       'severity' => ['severity'],
88     ],
89   ];
90
91   return $schema;
92 }