diff options
author | Mario Vavti <mario@mariovavti.com> | 2018-02-15 19:24:15 +0100 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2018-02-15 19:24:15 +0100 |
commit | 9e251a1abcc50af0f678a17d3a688f4ba9e4a4fc (patch) | |
tree | cd58fb823f3b9019c2e69f533027eaedcd9cc208 /install/update.php | |
parent | 45b42cbc1c5356da61923f5bc2fbca1cec9f9119 (diff) | |
download | volse-hubzilla-9e251a1abcc50af0f678a17d3a688f4ba9e4a4fc.tar.gz volse-hubzilla-9e251a1abcc50af0f678a17d3a688f4ba9e4a4fc.tar.bz2 volse-hubzilla-9e251a1abcc50af0f678a17d3a688f4ba9e4a4fc.zip |
some more DB tuning.
Diffstat (limited to 'install/update.php')
-rw-r--r-- | install/update.php | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/install/update.php b/install/update.php index d5ad394f4..56cf3d608 100644 --- a/install/update.php +++ b/install/update.php @@ -1,6 +1,6 @@ <?php -define( 'UPDATE_VERSION' , 1201 ); +define( 'UPDATE_VERSION' , 1202 ); /** * @@ -3113,3 +3113,19 @@ function update_r1200() { return UPDATE_SUCCESS; return UPDATE_FAILED; } + +function update_r1201() { + + if(ACTIVE_DBTYPE == DBTYPE_MYSQL) { + $r = q("ALTER TABLE item + DROP INDEX item_thread_top, + ADD INDEX uid_item_thread_top (uid, item_thread_top), + ADD INDEX uid_item_blocked (uid, item_blocked), + ADD INDEX item_deleted_pending_remove_changed (item_deleted, item_pending_remove, changed) + "); + } + + if($r) + return UPDATE_SUCCESS; + return UPDATE_FAILED; +} |