summaryrefslogtreecommitdiff
path: root/modules/statistics/statistics.install
diff options
context:
space:
mode:
Diffstat (limited to 'modules/statistics/statistics.install')
-rw-r--r--modules/statistics/statistics.install24
1 files changed, 24 insertions, 0 deletions
diff --git a/modules/statistics/statistics.install b/modules/statistics/statistics.install
index 61a0be64d..93cfc8c5f 100644
--- a/modules/statistics/statistics.install
+++ b/modules/statistics/statistics.install
@@ -43,3 +43,27 @@ function statistics_uninstall() {
variable_del('statistics_block_top_all_num');
variable_del('statistics_block_top_last_num');
}
+
+/**
+ * Implementation of hook_schema().
+ */
+function statistics_schema() {
+ $schema['accesslog'] = array(
+ '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)
+ ),
+ 'indexes' => array('accesslog_timestamp' => array('timestamp')),
+ 'primary key' => array('aid'),
+ );
+
+ return $schema;
+}
+