From 6a594f7f72c6dedd73c5ecf58d52415eeefe9979 Mon Sep 17 00:00:00 2001 From: Dmitriy Simushev Date: Sun, 26 Feb 2012 14:05:14 +0000 Subject: [PATCH] Added indexes to the 'chatgroupoperator' table --- src/messenger/webim/install/dbinfo.php | 4 ++++ src/messenger/webim/install/dbperform.php | 8 ++++++++ 2 files changed, 12 insertions(+) diff --git a/src/messenger/webim/install/dbinfo.php b/src/messenger/webim/install/dbinfo.php index 0a79b3de..39e53dce 100644 --- a/src/messenger/webim/install/dbinfo.php +++ b/src/messenger/webim/install/dbinfo.php @@ -150,6 +150,10 @@ $dbtables_indexes = array( "${mysqlprefix}chatgroup" => array( "parent" => "parent" ), + "${mysqlprefix}chatgroupoperator" => array( + "groupid" => "groupid", + "operatorid" => "operatorid" + ), "${mysqlprefix}chatmessage" => array( "idx_agentid" => "agentid" ), diff --git a/src/messenger/webim/install/dbperform.php b/src/messenger/webim/install/dbperform.php index abfd81a6..d306a932 100644 --- a/src/messenger/webim/install/dbperform.php +++ b/src/messenger/webim/install/dbperform.php @@ -194,6 +194,14 @@ if ($act == "silentcreateall") { runsql("ALTER TABLE ${mysqlprefix}chatgroup ADD INDEX (parent)", $link); } + if (in_array("${mysqlprefix}chatgroupoperator.groupid", $absent_indexes)) { + runsql("ALTER TABLE ${mysqlprefix}chatgroupoperator ADD INDEX (groupid)", $link); + } + + if (in_array("${mysqlprefix}chatgroupoperator.operatorid", $absent_indexes)) { + runsql("ALTER TABLE ${mysqlprefix}chatgroupoperator ADD INDEX (operatorid)", $link); + } + if (in_array("${mysqlprefix}chatmessage.idx_agentid", $absent_indexes)) { runsql("ALTER TABLE ${mysqlprefix}chatmessage ADD INDEX idx_agentid (agentid)", $link); }