diff options
Diffstat (limited to 'modules/search/search.install')
-rw-r--r-- | modules/search/search.install | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/modules/search/search.install b/modules/search/search.install index a7d8adbb1..0ba392849 100644 --- a/modules/search/search.install +++ b/modules/search/search.install @@ -89,7 +89,6 @@ function search_schema() { ), 'indexes' => array( 'sid_type' => array('sid', 'type'), - 'word' => array('word'), ), 'primary key' => array('word', 'sid', 'type'), ); @@ -152,3 +151,18 @@ function search_schema() { return $schema; } + +/** + * Replace unique keys in 'search_dataset' and 'search_index' by primary keys. + */ +function search_update_7000() { + $ret = array(); + db_drop_unique_key($ret, 'search_dataset', 'sid_type'); + db_add_primary_key($ret, 'search_dataset', array('sid', 'type')); + + db_drop_index($ret, 'search_index', 'word'); + db_drop_unique_key($ret, 'search_index', 'word_sid_type'); + db_add_primary_key($ret, 'search_index', array('word', 'sid', 'type')); + + return $ret; +} |