First commit
This commit is contained in:
30
app/im/info/UpdateSql.php
Executable file
30
app/im/info/UpdateSql.php
Executable file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
//获取表前缀
|
||||
$prefix = longbing_get_prefix();
|
||||
|
||||
//每个一个sql语句结束,都必须以英文分号结束。因为在执行sql时,需要分割单个脚本执行。
|
||||
//表前缀需要自己添加{$prefix} 以下脚本被测试脚本
|
||||
|
||||
|
||||
$sql = <<<updateSql
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `{$prefix}longbing_card_message_friend` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`user_id` int(10) NOT NULL COMMENT '发送消息用户id',
|
||||
`friend_id` int(10) NOT NULL COMMENT '接收消息用户id',
|
||||
`message_type` varchar(50) NOT NULL DEFAULT 'text',
|
||||
`lastmessage` text COMMENT '消息内容',
|
||||
`not_read_message_count` int(11) NOT NULL DEFAULT '0' COMMENT '未读消息数量',
|
||||
`uniacid` int(10) NOT NULL,
|
||||
`create_time` int(11) NOT NULL DEFAULT '0',
|
||||
`update_time` int(11) NOT NULL DEFAULT '0',
|
||||
`is_read` tinyint(1) NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `chat_id` (`user_id`,`friend_id`,`create_time`) USING BTREE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=175 DEFAULT CHARSET=utf8mb4 COMMENT='名片--聊天记录表';
|
||||
|
||||
ALTER TABLE `{$prefix}longbing_card_message_friend` ADD COLUMN `is_read` tinyint(1) NOT NULL DEFAULT 0;
|
||||
|
||||
updateSql;
|
||||
|
||||
return $sql;
|
||||
Reference in New Issue
Block a user