First commit

This commit is contained in:
2025-10-02 10:33:06 +08:00
parent 198b8bf2a6
commit c38eed4a22
5512 changed files with 958855 additions and 0 deletions

30
app/im/info/UpdateSql.php Executable file
View 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;