summaryrefslogtreecommitdiff
path: root/modules/statistics
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2007-10-05 14:43:26 +0000
committerDries Buytaert <dries@buytaert.net>2007-10-05 14:43:26 +0000
commit39706e3c51cf206ca6669bbb7a090d2f7d394591 (patch)
tree9286ccd302d526ea8a1de799081356fcc77c28a3 /modules/statistics
parentd568128b9f7a0181b31e9baa087022e892352ea7 (diff)
downloadbrdo-39706e3c51cf206ca6669bbb7a090d2f7d394591.tar.gz
brdo-39706e3c51cf206ca6669bbb7a090d2f7d394591.tar.bz2
- Patch #150245 by webchick, bjaspan, ralf, Arancaytar et al: move the .schema files into .install files to prevent mistakes.
Diffstat (limited to 'modules/statistics')
-rw-r--r--modules/statistics/statistics.install24
-rw-r--r--modules/statistics/statistics.schema23
2 files changed, 24 insertions, 23 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;
+}
+
diff --git a/modules/statistics/statistics.schema b/modules/statistics/statistics.schema
deleted file mode 100644
index a866c0a5f..000000000
--- a/modules/statistics/statistics.schema
+++ /dev/null
@@ -1,23 +0,0 @@
-<?php
-// $Id$
-
-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;
-}
-