summaryrefslogtreecommitdiff
path: root/modules/search
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/search
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/search')
-rw-r--r--modules/search/search.install41
-rw-r--r--modules/search/search.schema40
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;
-}
-