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/search | |
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/search')
-rw-r--r-- | modules/search/search.install | 41 | ||||
-rw-r--r-- | modules/search/search.schema | 40 |
2 files changed, 41 insertions, 40 deletions
diff --git a/modules/search/search.install b/modules/search/search.install index 6c7b0adc7..3f2fc48ab 100644 --- a/modules/search/search.install +++ b/modules/search/search.install @@ -20,3 +20,44 @@ function search_uninstall() { variable_del('overlap_cjk'); variable_del('search_cron_limit'); } + +/** + * Implementation of hook_schema(). + */ +function search_schema() { + $schema['search_dataset'] = array( + 'fields' => array( + 'sid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0), + 'type' => array('type' => 'varchar', 'length' => 16, 'not null' => FALSE), + 'data' => array('type' => 'text', 'not null' => TRUE, 'size' => 'big') + ), + 'indexes' => array('sid_type' => array('sid', 'type')), + ); + + $schema['search_index'] = array( + 'fields' => array( + 'word' => array('type' => 'varchar', 'length' => 50, 'not null' => TRUE, 'default' => ''), + 'sid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0), + 'type' => array('type' => 'varchar', 'length' => 16, 'not null' => FALSE), + 'fromsid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0), + 'fromtype' => array('type' => 'varchar', 'length' => 16, 'not null' => FALSE), + 'score' => array('type' => 'float', 'not null' => FALSE) + ), + 'indexes' => array( + 'from_sid_type' => array('fromsid', 'fromtype'), + 'sid_type' => array('sid', 'type'), + 'word' => array('word') + ), + ); + + $schema['search_total'] = array( + 'fields' => array( + 'word' => array('type' => 'varchar', 'length' => 50, 'not null' => TRUE, 'default' => ''), + 'count' => array('type' => 'float', 'not null' => FALSE) + ), + 'primary key' => array('word'), + ); + + return $schema; +} + diff --git a/modules/search/search.schema b/modules/search/search.schema deleted file mode 100644 index a90e3c6a1..000000000 --- a/modules/search/search.schema +++ /dev/null @@ -1,40 +0,0 @@ -<?php -// $Id$ - -function search_schema() { - $schema['search_dataset'] = array( - 'fields' => array( - 'sid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0), - 'type' => array('type' => 'varchar', 'length' => 16, 'not null' => FALSE), - 'data' => array('type' => 'text', 'not null' => TRUE, 'size' => 'big') - ), - 'indexes' => array('sid_type' => array('sid', 'type')), - ); - - $schema['search_index'] = array( - 'fields' => array( - 'word' => array('type' => 'varchar', 'length' => 50, 'not null' => TRUE, 'default' => ''), - 'sid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0), - 'type' => array('type' => 'varchar', 'length' => 16, 'not null' => FALSE), - 'fromsid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0), - 'fromtype' => array('type' => 'varchar', 'length' => 16, 'not null' => FALSE), - 'score' => array('type' => 'float', 'not null' => FALSE) - ), - 'indexes' => array( - 'from_sid_type' => array('fromsid', 'fromtype'), - 'sid_type' => array('sid', 'type'), - 'word' => array('word') - ), - ); - - $schema['search_total'] = array( - 'fields' => array( - 'word' => array('type' => 'varchar', 'length' => 50, 'not null' => TRUE, 'default' => ''), - 'count' => array('type' => 'float', 'not null' => FALSE) - ), - 'primary key' => array('word'), - ); - - return $schema; -} - |