diff options
author | Dries Buytaert <dries@buytaert.net> | 2007-10-05 14:43:26 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2007-10-05 14:43:26 +0000 |
commit | 39706e3c51cf206ca6669bbb7a090d2f7d394591 (patch) | |
tree | 9286ccd302d526ea8a1de799081356fcc77c28a3 /modules/statistics | |
parent | d568128b9f7a0181b31e9baa087022e892352ea7 (diff) | |
download | brdo-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.install | 24 | ||||
-rw-r--r-- | modules/statistics/statistics.schema | 23 |
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; -} - |