Added indexes to the 'chatgroupoperator' table

This commit is contained in:
Dmitriy Simushev 2012-02-26 14:05:14 +00:00
parent 354ffafa0b
commit 6a594f7f72
2 changed files with 12 additions and 0 deletions

View File

@ -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"
),

View File

@ -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);
}