summaryrefslogtreecommitdiff
path: root/modules/search
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2010-08-11 02:14:23 +0000
committerDries Buytaert <dries@buytaert.net>2010-08-11 02:14:23 +0000
commitb45bda8d7b5194c8095ed3266146ce20fc5d560a (patch)
tree0c2604abd2fb59cf85717bff23ea6d229c1d9dde /modules/search
parentb7aa69ed247c2b60b76c680c9162e26c0918751d (diff)
downloadbrdo-b45bda8d7b5194c8095ed3266146ce20fc5d560a.tar.gz
brdo-b45bda8d7b5194c8095ed3266146ce20fc5d560a.tar.bz2
- Patch #853896 by Stevel: type field is part of primary key but not marked as NOT NULL.
Diffstat (limited to 'modules/search')
-rw-r--r--modules/search/search.install19
1 files changed, 17 insertions, 2 deletions
diff --git a/modules/search/search.install b/modules/search/search.install
index 54d19d1fa..a73afc751 100644
--- a/modules/search/search.install
+++ b/modules/search/search.install
@@ -32,7 +32,7 @@ function search_schema() {
'type' => array(
'type' => 'varchar',
'length' => 16,
- 'not null' => FALSE,
+ 'not null' => TRUE,
'description' => 'Type of item, e.g. node.',
),
'data' => array(
@@ -72,7 +72,7 @@ function search_schema() {
'type' => array(
'type' => 'varchar',
'length' => 16,
- 'not null' => FALSE,
+ 'not null' => TRUE,
'description' => 'The {search_dataset}.type of the searchable item to which the word belongs.',
),
'score' => array(
@@ -155,9 +155,24 @@ function search_schema() {
*/
function search_update_7000() {
db_drop_unique_key('search_dataset', 'sid_type');
+ $dataset_type_spec = array(
+ 'type' => 'varchar',
+ 'length' => 16,
+ 'not null' => TRUE,
+ 'description' => 'Type of item, e.g. node.',
+ );
+ db_change_field('search_dataset', 'type', 'type', $dataset_type_spec);
db_add_primary_key('search_dataset', array('sid', 'type'));
db_drop_index('search_index', 'word');
db_drop_unique_key('search_index', 'word_sid_type');
+ $index_type_spec = array(
+ 'type' => 'varchar',
+ 'length' => 16,
+ 'not null' => TRUE,
+ 'description' => 'The {search_dataset}.type of the searchable item to which the word belongs.',
+ );
+ db_change_field('search_index', 'type', 'type', $index_type_spec);
db_add_primary_key('search_index', array('word', 'sid', 'type'));
}
+