backport update 1201 to the new update system and move dummy update to 1202

This commit is contained in:
Mario Vavti 2018-02-19 10:59:21 +01:00
parent 46cb45d94b
commit 1732ffed7a
2 changed files with 28 additions and 5 deletions

View File

@ -6,10 +6,18 @@ class _1201 {
function run() {
// empty update in order to make the DB_UPDATE_VERSION equal to the current maximum update function
// rather than being one greater than the last known update
return UPDATE_SUCCESS;
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;
}
}
}

15
Zotlabs/Update/_1202.php Normal file
View File

@ -0,0 +1,15 @@
<?php
namespace Zotlabs\Update;
class _1202 {
function run() {
// empty update in order to make the DB_UPDATE_VERSION equal to the current maximum update function
// rather than being one greater than the last known update
return UPDATE_SUCCESS;
}
}