diff options
author | Gábor Hojtsy <gabor@hojtsy.hu> | 2007-10-10 11:39:35 +0000 |
---|---|---|
committer | Gábor Hojtsy <gabor@hojtsy.hu> | 2007-10-10 11:39:35 +0000 |
commit | 8cf6fefe54f47e792cfd92c917c2c41d4523da7b (patch) | |
tree | b879701f7d8768fb10864536721f54a683e5a5ee /modules/dblog | |
parent | e5b36135496c874a8686eda2efb1635abae41871 (diff) | |
download | brdo-8cf6fefe54f47e792cfd92c917c2c41d4523da7b.tar.gz brdo-8cf6fefe54f47e792cfd92c917c2c41d4523da7b.tar.bz2 |
#164983 by multiple contributors: document the core database schemas
Diffstat (limited to 'modules/dblog')
-rw-r--r-- | modules/dblog/dblog.install | 82 |
1 files changed, 71 insertions, 11 deletions
diff --git a/modules/dblog/dblog.install b/modules/dblog/dblog.install index 41db4cc4f..acea095bd 100644 --- a/modules/dblog/dblog.install +++ b/modules/dblog/dblog.install @@ -22,18 +22,78 @@ function dblog_uninstall() { */ function dblog_schema() { $schema['watchdog'] = array( + 'description' => t('Table that contains logs of all system events.'), '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' => 'big'), - 'variables' => array('type' => 'text', 'not null' => TRUE, 'size' => 'big'), - '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) + 'wid' => array( + 'type' => 'serial', + 'not null' => TRUE, + 'description' => t('Primary Key: Unique watchdog event ID.'), + ), + 'uid' => array( + 'type' => 'int', + 'not null' => TRUE, + 'default' => 0, + 'description' => t('The {user}.uid of the user who triggered the event.'), + ), + 'type' => array( + 'type' => 'varchar', + 'length' => 16, + 'not null' => TRUE, + 'default' => '', + 'description' => t('Type of log message, for example "user" or "page not found."'), + ), + 'message' => array( + 'type' => 'text', + 'not null' => TRUE, + 'size' => 'big', + 'description' => t('Text of log message to be passed into the t() function.'), + ), + 'variables' => array( + 'type' => 'text', + 'not null' => TRUE, + 'size' => 'big', + 'description' => t('Serialized array of variables that match the message string and that is passed into the t() function.'), + ), + 'severity' => array( + 'type' => 'int', + 'unsigned' => TRUE, + 'not null' => TRUE, + 'default' => 0, + 'size' => 'tiny', + 'description' => t('The severity level of the event; ranges from 0 (Emergency) to 7 (Debug)'), + ), + 'link' => array( + 'type' => 'varchar', + 'length' => 255, + 'not null' => TRUE, + 'default' => '', + 'description' => t('Link to view the result of the event.'), + ), + 'location' => array( + 'type' => 'text', + 'not null' => TRUE, + 'description' => t('URL of the origin of the event.'), + ), + 'referer' => array( + 'type' => 'varchar', + 'length' => 128, + 'not null' => TRUE, + 'default' => '', + 'description' => t('URL of referring page.'), + ), + 'hostname' => array( + 'type' => 'varchar', + 'length' => 128, + 'not null' => TRUE, + 'default' => '', + 'description' => t('Hostname of the user who triggered the event.'), + ), + 'timestamp' => array( + 'type' => 'int', + 'not null' => TRUE, + 'default' => 0, + 'description' => t('Unix timestamp of when event occurred.'), + ), ), 'primary key' => array('wid'), 'indexes' => array('type' => array('type')), |