another DB upgrade to address some long running maintenance queries
This commit is contained in:
parent
673cf8d35e
commit
51c0e5a988
27
Zotlabs/Update/_1205.php
Normal file
27
Zotlabs/Update/_1205.php
Normal file
@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace Zotlabs\Update;
|
||||
|
||||
class _1205 {
|
||||
|
||||
function run() {
|
||||
|
||||
if(ACTIVE_DBTYPE == DBTYPE_MYSQL) {
|
||||
$r = q("ALTER TABLE item
|
||||
DROP INDEX item_private,
|
||||
ADD INDEX uid_item_private (uid, item_private),
|
||||
ADD INDEX item_wall (item_wall),
|
||||
ADD INDEX item_pending_remove_changed (item_pending_remove, changed)
|
||||
");
|
||||
|
||||
if($r)
|
||||
return UPDATE_SUCCESS;
|
||||
return UPDATE_FAILED;
|
||||
}
|
||||
else {
|
||||
return UPDATE_SUCCESS;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
2
boot.php
2
boot.php
@ -53,7 +53,7 @@ define ( 'PLATFORM_NAME', 'hubzilla' );
|
||||
define ( 'STD_VERSION', '3.1.12' );
|
||||
define ( 'ZOT_REVISION', '1.3' );
|
||||
|
||||
define ( 'DB_UPDATE_VERSION', 1204 );
|
||||
define ( 'DB_UPDATE_VERSION', 1205 );
|
||||
|
||||
define ( 'PROJECT_BASE', __DIR__ );
|
||||
|
||||
|
@ -657,6 +657,7 @@ CREATE TABLE IF NOT EXISTS `item` (
|
||||
KEY `uid_item_wall` (`uid`, `item_wall`),
|
||||
KEY `uid_item_starred` (`uid`, `item_starred`),
|
||||
KEY `uid_item_retained` (`uid`, `item_retained`),
|
||||
KEY `uid_item_private` (`uid`, `item_private`),
|
||||
KEY `aid` (`aid`),
|
||||
KEY `owner_xchan` (`owner_xchan`),
|
||||
KEY `author_xchan` (`author_xchan`),
|
||||
@ -667,7 +668,6 @@ CREATE TABLE IF NOT EXISTS `item` (
|
||||
KEY `commented` (`commented`),
|
||||
KEY `verb` (`verb`),
|
||||
KEY `obj_type` (`obj_type`),
|
||||
KEY `item_private` (`item_private`),
|
||||
KEY `llink` (`llink`),
|
||||
KEY `expires` (`expires`),
|
||||
KEY `revision` (`revision`),
|
||||
@ -681,6 +681,7 @@ CREATE TABLE IF NOT EXISTS `item` (
|
||||
KEY `comments_closed` (`comments_closed`),
|
||||
KEY `changed` (`changed`),
|
||||
KEY `item_origin` (`item_origin`),
|
||||
KEY `item_wall` (`item_wall`),
|
||||
KEY `item_unseen` (`item_unseen`),
|
||||
KEY `item_uplink` (`item_uplink`),
|
||||
KEY `item_notshown` (`item_notshown`),
|
||||
@ -692,7 +693,8 @@ CREATE TABLE IF NOT EXISTS `item` (
|
||||
KEY `item_verified` (`item_verified`),
|
||||
KEY `item_rss` (`item_rss`),
|
||||
KEY `item_consensus` (`item_consensus`),
|
||||
KEY `item_deleted_pending_remove_changed` (`item_deleted`, `item_pending_remove`, `changed`)
|
||||
KEY `item_deleted_pending_remove_changed` (`item_deleted`, `item_pending_remove`, `changed`),
|
||||
KEY `item_pending_remove_changed` (`item_pending_remove`, `changed`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `item_id` (
|
||||
|
Reference in New Issue
Block a user