Mercurial > defr > drupal > core
comparison modules/dblog/dblog.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: dblog.install,v 1.6 2007/11/04 14:33:06 goba Exp $ | 2 // $Id: dblog.install,v 1.6.2.1 2009/01/06 15:46:36 goba Exp $ |
3 | 3 |
4 /** | 4 /** |
5 * Implementation of hook_install(). | 5 * Implementation of hook_install(). |
6 */ | 6 */ |
7 function dblog_install() { | 7 function dblog_install() { |
20 /** | 20 /** |
21 * Implementation of hook_schema(). | 21 * Implementation of hook_schema(). |
22 */ | 22 */ |
23 function dblog_schema() { | 23 function dblog_schema() { |
24 $schema['watchdog'] = array( | 24 $schema['watchdog'] = array( |
25 'description' => t('Table that contains logs of all system events.'), | 25 'description' => 'Table that contains logs of all system events.', |
26 'fields' => array( | 26 'fields' => array( |
27 'wid' => array( | 27 'wid' => array( |
28 'type' => 'serial', | 28 'type' => 'serial', |
29 'not null' => TRUE, | 29 'not null' => TRUE, |
30 'description' => t('Primary Key: Unique watchdog event ID.'), | 30 'description' => 'Primary Key: Unique watchdog event ID.', |
31 ), | 31 ), |
32 'uid' => array( | 32 'uid' => array( |
33 'type' => 'int', | 33 'type' => 'int', |
34 'not null' => TRUE, | 34 'not null' => TRUE, |
35 'default' => 0, | 35 'default' => 0, |
36 'description' => t('The {users}.uid of the user who triggered the event.'), | 36 'description' => 'The {users}.uid of the user who triggered the event.', |
37 ), | 37 ), |
38 'type' => array( | 38 'type' => array( |
39 'type' => 'varchar', | 39 'type' => 'varchar', |
40 'length' => 16, | 40 'length' => 16, |
41 'not null' => TRUE, | 41 'not null' => TRUE, |
42 'default' => '', | 42 'default' => '', |
43 'description' => t('Type of log message, for example "user" or "page not found."'), | 43 'description' => 'Type of log message, for example "user" or "page not found."', |
44 ), | 44 ), |
45 'message' => array( | 45 'message' => array( |
46 'type' => 'text', | 46 'type' => 'text', |
47 'not null' => TRUE, | 47 'not null' => TRUE, |
48 'size' => 'big', | 48 'size' => 'big', |
49 'description' => t('Text of log message to be passed into the t() function.'), | 49 'description' => 'Text of log message to be passed into the t() function.', |
50 ), | 50 ), |
51 'variables' => array( | 51 'variables' => array( |
52 'type' => 'text', | 52 'type' => 'text', |
53 'not null' => TRUE, | 53 'not null' => TRUE, |
54 'size' => 'big', | 54 'size' => 'big', |
55 'description' => t('Serialized array of variables that match the message string and that is passed into the t() function.'), | 55 'description' => 'Serialized array of variables that match the message string and that is passed into the t() function.', |
56 ), | 56 ), |
57 'severity' => array( | 57 'severity' => array( |
58 'type' => 'int', | 58 'type' => 'int', |
59 'unsigned' => TRUE, | 59 'unsigned' => TRUE, |
60 'not null' => TRUE, | 60 'not null' => TRUE, |
61 'default' => 0, | 61 'default' => 0, |
62 'size' => 'tiny', | 62 'size' => 'tiny', |
63 'description' => t('The severity level of the event; ranges from 0 (Emergency) to 7 (Debug)'), | 63 'description' => 'The severity level of the event; ranges from 0 (Emergency) to 7 (Debug)', |
64 ), | 64 ), |
65 'link' => array( | 65 'link' => array( |
66 'type' => 'varchar', | 66 'type' => 'varchar', |
67 'length' => 255, | 67 'length' => 255, |
68 'not null' => TRUE, | 68 'not null' => TRUE, |
69 'default' => '', | 69 'default' => '', |
70 'description' => t('Link to view the result of the event.'), | 70 'description' => 'Link to view the result of the event.', |
71 ), | 71 ), |
72 'location' => array( | 72 'location' => array( |
73 'type' => 'text', | 73 'type' => 'text', |
74 'not null' => TRUE, | 74 'not null' => TRUE, |
75 'description' => t('URL of the origin of the event.'), | 75 'description' => 'URL of the origin of the event.', |
76 ), | 76 ), |
77 'referer' => array( | 77 'referer' => array( |
78 'type' => 'varchar', | 78 'type' => 'varchar', |
79 'length' => 128, | 79 'length' => 128, |
80 'not null' => TRUE, | 80 'not null' => TRUE, |
81 'default' => '', | 81 'default' => '', |
82 'description' => t('URL of referring page.'), | 82 'description' => 'URL of referring page.', |
83 ), | 83 ), |
84 'hostname' => array( | 84 'hostname' => array( |
85 'type' => 'varchar', | 85 'type' => 'varchar', |
86 'length' => 128, | 86 'length' => 128, |
87 'not null' => TRUE, | 87 'not null' => TRUE, |
88 'default' => '', | 88 'default' => '', |
89 'description' => t('Hostname of the user who triggered the event.'), | 89 'description' => 'Hostname of the user who triggered the event.', |
90 ), | 90 ), |
91 'timestamp' => array( | 91 'timestamp' => array( |
92 'type' => 'int', | 92 'type' => 'int', |
93 'not null' => TRUE, | 93 'not null' => TRUE, |
94 'default' => 0, | 94 'default' => 0, |
95 'description' => t('Unix timestamp of when event occurred.'), | 95 'description' => 'Unix timestamp of when event occurred.', |
96 ), | 96 ), |
97 ), | 97 ), |
98 'primary key' => array('wid'), | 98 'primary key' => array('wid'), |
99 'indexes' => array('type' => array('type')), | 99 'indexes' => array('type' => array('type')), |
100 ); | 100 ); |