Commit 2cea471b authored by Dries's avatar Dries

- Patch #257910 by Damien Tournoud: use primary key instead.

parent ba1af443
......@@ -55,9 +55,7 @@ function search_schema() {
'description' => t('Set to force node reindexing.'),
),
),
'indexes' => array(
'sid_type' => array('sid', 'type'),
),
'primary key' => array('sid', 'type'),
);
$schema['search_index'] = array(
......@@ -93,9 +91,7 @@ function search_schema() {
'sid_type' => array('sid', 'type'),
'word' => array('word'),
),
'unique keys' => array(
'word_sid_type' => array('word', 'sid', 'type'),
),
'primary key' => array('word', 'sid', 'type'),
);
$schema['search_total'] = array(
......
......@@ -3101,12 +3101,16 @@ function system_update_7011() {
}
/**
* Replace unique key 'sid_type' by indexes in 'search_dataset' table.
* Replace unique keys in 'search_dataset' and 'search_index' by primary keys.
*/
function system_update_7012() {
$ret = array();
db_drop_unique_key($ret, 'search_dataset', 'sid_type');
db_add_index($ret, 'search_dataset', 'sid_type', array('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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment