From 8cf6fefe54f47e792cfd92c917c2c41d4523da7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor=20Hojtsy?= Date: Wed, 10 Oct 2007 11:39:35 +0000 Subject: #164983 by multiple contributors: document the core database schemas --- modules/statistics/statistics.install | 67 ++++++++++++++++++++++++++++++----- 1 file changed, 58 insertions(+), 9 deletions(-) (limited to 'modules/statistics/statistics.install') diff --git a/modules/statistics/statistics.install b/modules/statistics/statistics.install index 93cfc8c5f..25b208f46 100644 --- a/modules/statistics/statistics.install +++ b/modules/statistics/statistics.install @@ -49,16 +49,65 @@ function statistics_uninstall() { */ function statistics_schema() { $schema['accesslog'] = array( + 'description' => t('Stores site access information for statistics.'), '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) + 'aid' => array( + 'type' => 'serial', + 'not null' => TRUE, + 'description' => t('Primary Key: Unique accesslog ID.'), + ), + 'sid' => array( + 'type' => 'varchar', + 'length' => 64, + 'not null' => TRUE, + 'default' => '', + 'description' => t('Browser session ID of user that visited page.'), + ), + 'title' => array( + 'type' => 'varchar', + 'length' => 255, + 'not null' => FALSE, + 'description' => t('Title of page visited.'), + ), + 'path' => array( + 'type' => 'varchar', + 'length' => 255, + 'not null' => FALSE, + 'description' => t('Internal path to page visited (relative to Drupal root.)'), + ), + 'url' => array( + 'type' => 'varchar', + 'length' => 255, + 'not null' => FALSE, + 'description' => t('Referrer URI.'), + ), + 'hostname' => array( + 'type' => 'varchar', + 'length' => 128, + 'not null' => FALSE, + 'description' => t('Hostname of user that visited the page.'), + ), + 'uid' => array( + 'type' => 'int', + 'unsigned' => TRUE, + 'not null' => FALSE, + 'default' => 0, + 'description' => t('User {user}.uid that visited the page.'), + ), + 'timer' => array( + 'type' => 'int', + 'unsigned' => TRUE, + 'not null' => TRUE, + 'default' => 0, + 'description' => t('Time in milliseconds that the page took to load.'), + ), + 'timestamp' => array( + 'type' => 'int', + 'unsigned' => TRUE, + 'not null' => TRUE, + 'default' => 0, + 'description' => t('Timestamp of when the page was visited.'), + ), ), 'indexes' => array('accesslog_timestamp' => array('timestamp')), 'primary key' => array('aid'), -- cgit v1.2.3