mirror of
https://github.com/Mibew/tray.git
synced 2025-01-23 02:20:35 +03:00
departments in db
git-svn-id: https://webim.svn.sourceforge.net/svnroot/webim/trunk@272 c66351dc-e62f-0410-b875-e3a5c0b9693f
This commit is contained in:
parent
4c40e55a55
commit
c142f32c76
@ -13,6 +13,12 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
$dbtables = array(
|
$dbtables = array(
|
||||||
|
"chatdepartment" => array(
|
||||||
|
"departmentid" => "int NOT NULL auto_increment PRIMARY KEY",
|
||||||
|
"vcname" => "varchar(64) NOT NULL",
|
||||||
|
"vcdescription" => "varchar(1024) NOT NULL",
|
||||||
|
),
|
||||||
|
|
||||||
"chatthread" => array(
|
"chatthread" => array(
|
||||||
"threadid" => "int NOT NULL auto_increment PRIMARY KEY",
|
"threadid" => "int NOT NULL auto_increment PRIMARY KEY",
|
||||||
"userName" => "varchar(64) NOT NULL",
|
"userName" => "varchar(64) NOT NULL",
|
||||||
@ -34,7 +40,8 @@ $dbtables = array(
|
|||||||
"agentTyping" => "int DEFAULT 0",
|
"agentTyping" => "int DEFAULT 0",
|
||||||
"shownmessageid" => "int NOT NULL DEFAULT 0",
|
"shownmessageid" => "int NOT NULL DEFAULT 0",
|
||||||
"userAgent" => "varchar(255)",
|
"userAgent" => "varchar(255)",
|
||||||
"messageCount" => "varchar(16)"
|
"messageCount" => "varchar(16)",
|
||||||
|
"departmentid" => "int references chatdepartment(departmentid)",
|
||||||
),
|
),
|
||||||
|
|
||||||
"chatmessage" => array(
|
"chatmessage" => array(
|
||||||
@ -63,6 +70,11 @@ $dbtables = array(
|
|||||||
"id" => "INT NOT NULL"
|
"id" => "INT NOT NULL"
|
||||||
),
|
),
|
||||||
|
|
||||||
|
"chatdepartmentoperator" => array(
|
||||||
|
"departmentid" => "int NOT NULL references chatdepartment(departmentid)",
|
||||||
|
"operatorid" => "int NOT NULL references chatoperator(operatorid)",
|
||||||
|
),
|
||||||
|
|
||||||
"chatban" => array(
|
"chatban" => array(
|
||||||
"banid" => "INT NOT NULL auto_increment PRIMARY KEY",
|
"banid" => "INT NOT NULL auto_increment PRIMARY KEY",
|
||||||
"dtmcreated" => "datetime DEFAULT 0",
|
"dtmcreated" => "datetime DEFAULT 0",
|
||||||
@ -82,10 +94,12 @@ $dbtables = array(
|
|||||||
$memtables = array();
|
$memtables = array();
|
||||||
|
|
||||||
$dbtables_can_update = array(
|
$dbtables_can_update = array(
|
||||||
"chatthread" => array("agentId", "userTyping", "agentTyping", "messageCount", "nextagent", "shownmessageid", "userid", "userAgent"),
|
"chatthread" => array("agentId", "userTyping", "agentTyping", "messageCount", "nextagent", "shownmessageid", "userid", "userAgent", "departmentid"),
|
||||||
"chatmessage" => array("agentId"),
|
"chatmessage" => array("agentId"),
|
||||||
"chatoperator" => array("vcavatar", "vcjabbername", "iperm"),
|
"chatoperator" => array("vcavatar", "vcjabbername", "iperm"),
|
||||||
"chatban" => array(),
|
"chatban" => array(),
|
||||||
|
"chatdepartment" => array(),
|
||||||
|
"chatdepartmentoperator" => array(),
|
||||||
);
|
);
|
||||||
|
|
||||||
function show_install_err($text) {
|
function show_install_err($text) {
|
||||||
|
@ -118,6 +118,10 @@ if ($act == "silentcreateall") {
|
|||||||
runsql("ALTER TABLE chatoperator ADD vcjabbername varchar(255)", $link);
|
runsql("ALTER TABLE chatoperator ADD vcjabbername varchar(255)", $link);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if( in_array("chatthread.departmentid", $absent) ) {
|
||||||
|
runsql("ALTER TABLE chatthread ADD departmentid int references chatdepartment(departmentid)", $link);
|
||||||
|
}
|
||||||
|
|
||||||
if( in_array("chatthread.userAgent", $absent) ) {
|
if( in_array("chatthread.userAgent", $absent) ) {
|
||||||
runsql("ALTER TABLE chatthread ADD userAgent varchar(255)", $link);
|
runsql("ALTER TABLE chatthread ADD userAgent varchar(255)", $link);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user