more db and queries finetuning

This commit is contained in:
Mario Vavti
2018-02-08 09:47:49 +01:00
parent b512780e37
commit 661c20e452
4 changed files with 32 additions and 18 deletions

View File

@@ -1,6 +1,6 @@
<?php
define( 'UPDATE_VERSION' , 1200 );
define( 'UPDATE_VERSION' , 1201 );
/**
*
@@ -3099,3 +3099,17 @@ function update_r1199() {
return UPDATE_SUCCESS;
}
function update_r1200() {
if(ACTIVE_DBTYPE == DBTYPE_MYSQL) {
$r = q("ALTER TABLE item
DROP INDEX item_type,
ADD INDEX uid_item_type (uid, item_type)
");
}
if($r)
return UPDATE_SUCCESS;
return UPDATE_FAILED;
}