diff options
author | Dries Buytaert <dries@buytaert.net> | 2008-11-02 17:56:20 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2008-11-02 17:56:20 +0000 |
commit | 2cea471b5d9114b22641467534fcc51427a17d12 (patch) | |
tree | 541d3287994734bffe53d000d0d58c77671664a3 | |
parent | ba1af4437529c30c46d5aabf5602ee5e4b3ebc43 (diff) | |
download | brdo-2cea471b5d9114b22641467534fcc51427a17d12.tar.gz brdo-2cea471b5d9114b22641467534fcc51427a17d12.tar.bz2 |
- Patch #257910 by Damien Tournoud: use primary key instead.
-rw-r--r-- | modules/search/search.install | 8 | ||||
-rw-r--r-- | modules/system/system.install | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/modules/search/search.install b/modules/search/search.install index 684e85e4d..a7d8adbb1 100644 --- a/modules/search/search.install +++ b/modules/search/search.install @@ -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( diff --git a/modules/system/system.install b/modules/system/system.install index 3a7bec61c..a1c353aa9 100644 --- a/modules/system/system.install +++ b/modules/system/system.install @@ -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; } |