Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wecloud_im_server
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hewei
wecloud_im_server
Commits
ff7ce827
Commit
ff7ce827
authored
Jan 24, 2022
by
hweeeeeei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改feature-cluster增量.sql文件
parent
61dd8b49
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
53 additions
and
46 deletions
+53
-46
docs/db/feature-cluster增量.sql
+53
-46
No files found.
docs/db/feature-cluster增量.sql
View file @
ff7ce827
-- 在f
eature-cluster 2021年12月22日之后,需要执行的的sql增量脚本
-- 在f
eature-cluster 2021年12月22日之后,需要执行的的sql增量脚本
-- 在feature-cluster 2021年12月22日之后,需要执行的的sql增量脚本
-- 在feature-cluster 2021年12月22日之后,需要执行的的sql增量脚本
ALTER
TABLE
`im_conversation`
CHANGE
COLUMN
`system`
`system_flag`
tinyint
(
1
)
NULL
DEFAULT
NULL
COMMENT
'可选 对话类型标志,是否是系统对话,后面会说明。'
AFTER
`attributes`
;
ALTER
TABLE
`im_conversation`
CHANGE
COLUMN
`system
``
system_flag`
tinyint
(
1
)
NULL
DEFAULT
NULL
COMMENT
'可选 对话类型标志,是否是系统对话,后面会说明。'
AFTER
`attributes`
;
ALTER
TABLE
`im_message`
CHANGE
COLUMN
`system`
`system_flag`
tinyint
(
1
)
NULL
DEFAULT
0
COMMENT
'0非系统通知; 1为系统通知'
AFTER
`event`
;
ALTER
TABLE
`im_message`
CHANGE
COLUMN
`system
``
system_flag`
tinyint
(
1
)
NULL
DEFAULT
0
COMMENT
'0非系统通知; 1为系统通知'
AFTER
`event`
;
-- 在feature-cluster 2022年1月4日之后,需要执行的sql增量脚本
-- 在feature-cluster 2022年1月4日之后,需要执行的sql增量脚本
ALTER
TABLE
im_conversation
`
ALTER
TABLE
im_conversation
ADD COLUMN `
member_count
` int NULL COMMENT '群成员数' AFTER `
last_message
`,
ADD
COLUMN
`member_count`
int
NULL
COMMENT
'群成员数'
AFTER
`last_message`
;
ADD COLUMN `
chat_type
` tinyint NULL COMMENT '是否万人群' AFTER `
member_count
`;
ALTER TABLE `
im_conversation_members
` ADD INDEX `
fk_client_id
`(`
fk_client_id
`);
ALTER
TABLE
im_conversation
ADD
COLUMN
`chat_type`
tinyint
NULL
COMMENT
'是否万人群'
AFTER
`member_count`
;
ALTER
TABLE
`im_conversation_members`
ADD
INDEX
`fk_client_id`
(
`fk_client_id`
);
-- 在feature-cluster 2022年1月10日之后,需要执行的sql增量脚本
-- 在feature-cluster 2022年1月10日之后,需要执行的sql增量脚本
-- 消息最新已读寻址表
-- 消息最新已读寻址表
CREATE TABLE `
im_msg_read_lastest
` (
CREATE
TABLE
`im_msg_read_lastest`
`
id
` bigint NOT NULL COMMENT '收件id',
(
`
create_time
` timestamp NULL DEFAULT NULL COMMENT '创建时间',
`id`
bigint
NOT
NULL
COMMENT
'收件id'
,
`
update_time
` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
`create_time`
timestamp
NULL
DEFAULT
NULL
COMMENT
'创建时间'
,
`
read_time
` timestamp NULL DEFAULT NULL COMMENT '读取时间',
`update_time`
timestamp
NULL
DEFAULT
NULL
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'修改时间'
,
`
receive_time
` timestamp NULL DEFAULT NULL COMMENT '接收时间',
`read_time`
timestamp
NULL
DEFAULT
NULL
COMMENT
'读取时间'
,
`
fk_appid
` bigint NOT NULL COMMENT '应用appid',
`receive_time`
timestamp
NULL
DEFAULT
NULL
COMMENT
'接收时间'
,
`
fk_client_id
` bigint NOT NULL COMMENT '接收客户端id',
`fk_appid`
bigint
NOT
NULL
COMMENT
'应用appid'
,
`
fk_conversation_id
` bigint NOT NULL COMMENT '会话id',
`fk_client_id`
bigint
NOT
NULL
COMMENT
'接收客户端id'
,
`
fk_receive_msg_id
` bigint DEFAULT NULL COMMENT '最后一条已接收的消息id',
`fk_conversation_id`
bigint
NOT
NULL
COMMENT
'会话id'
,
`
fk_read_msg_id
` bigint DEFAULT NULL COMMENT '最后一条已读的消息id',
`fk_receive_msg_id`
bigint
DEFAULT
NULL
COMMENT
'最后一条已接收的消息id'
,
PRIMARY KEY (`
id
`) USING BTREE,
`fk_read_msg_id`
bigint
DEFAULT
NULL
COMMENT
'最后一条已读的消息id'
,
UNIQUE KEY `
receiver_conversation
` (`
fk_client_id
`,`
fk_conversation_id
`) USING BTREE
PRIMARY
KEY
(
`id`
)
USING
BTREE
,
UNIQUE
KEY
`receiver_conversation`
(
`fk_client_id`
,
`fk_conversation_id`
)
USING
BTREE
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8mb4
COMMENT
=
'消息最新已读寻址表'
;
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8mb4
COMMENT
=
'消息最新已读寻址表'
;
CREATE TABLE `
im_friend
` (
CREATE
TABLE
`im_friend`
`
id
` bigint NOT NULL COMMENT '主键id',
(
`
fk_client_id
` bigint NOT NULL COMMENT '自己id',
`id`
bigint
NOT
NULL
COMMENT
'主键id'
,
`
fk_client_id_friend
` bigint NOT NULL COMMENT '好友id',
`fk_client_id`
bigint
NOT
NULL
COMMENT
'自己id'
,
`
fk_client_id_claimer
` bigint NOT NULL COMMENT '好友申请者',
`fk_client_id_friend`
bigint
NOT
NULL
COMMENT
'好友id'
,
`
friend_name
` varchar(255) DEFAULT NULL COMMENT '好友名称备注',
`fk_client_id_claimer`
bigint
NOT
NULL
COMMENT
'好友申请者'
,
`
reject_remark
` varchar(255) DEFAULT NULL COMMENT '拒绝说明',
`friend_name`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'好友名称备注'
,
`
request_remark
` varchar(255) DEFAULT NULL COMMENT '好友请求说明',
`reject_remark`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'拒绝说明'
,
`
state
` tinyint NOT NULL DEFAULT '0' COMMENT '好友状态,1:待确定,2:已确认,3:已拒绝,4:已删除',
`request_remark`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'好友请求说明'
,
`
create_time
` timestamp NULL DEFAULT NULL COMMENT '创建时间',
`state`
tinyint
NOT
NULL
DEFAULT
'0'
COMMENT
'好友状态,1:待确定,2:已确认,3:已拒绝,4:已删除'
,
`
update_time
` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
`create_time`
timestamp
NULL
DEFAULT
NULL
COMMENT
'创建时间'
,
PRIMARY KEY (`
id
`) USING BTREE,
`update_time`
timestamp
NULL
DEFAULT
NULL
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'修改时间'
,
UNIQUE KEY `
friend_id
` (`
fk_client_id
`,`
fk_client_id_friend
`) USING BTREE
PRIMARY
KEY
(
`id`
)
USING
BTREE
,
UNIQUE
KEY
`friend_id`
(
`fk_client_id`
,
`fk_client_id_friend`
)
USING
BTREE
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8mb4
COMMENT
=
'好友表'
;
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8mb4
COMMENT
=
'好友表'
;
CREATE TABLE `
im_friend_recommend
` (
CREATE
TABLE
`im_friend_recommend`
`
id
` bigint(20) NOT NULL COMMENT '主键id',
(
`
fk_client_id
` bigint(20) NOT NULL COMMENT '自己id',
`id`
bigint
(
20
)
NOT
NULL
COMMENT
'主键id'
,
`
fk_client_id_friend
` bigint(20) NOT NULL COMMENT '好友id',
`fk_client_id`
bigint
(
20
)
NOT
NULL
COMMENT
'自己id'
,
`
source
` tinyint DEFAULT NULL COMMENT '推荐来源',
`fk_client_id_friend`
bigint
(
20
)
NOT
NULL
COMMENT
'好友id'
,
`
del_flag
` bit(1) NOT NULL default 0 COMMENT '删除标识',
`source`
tinyint
DEFAULT
NULL
COMMENT
'推荐来源'
,
`
create_time
` timestamp NULL DEFAULT NULL COMMENT '创建时间',
`del_flag`
bit
(
1
)
NOT
NULL
default
0
COMMENT
'删除标识'
,
`
update_time
` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
`create_time`
timestamp
NULL
DEFAULT
NULL
COMMENT
'创建时间'
,
PRIMARY KEY (`
id
`) USING BTREE,
`update_time`
timestamp
NULL
DEFAULT
NULL
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'修改时间'
,
UNIQUE KEY `
friend_id
` (fk_client_id, fk_client_id_friend) USING BTREE
PRIMARY
KEY
(
`id`
)
USING
BTREE
,
UNIQUE
KEY
`friend_id`
(
fk_client_id
,
fk_client_id_friend
)
USING
BTREE
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8mb4
COMMENT
=
'好友表'
;
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8mb4
COMMENT
=
'好友表'
;
-- 2022年01月21日17:31:16 何威 将type参数上移一层
-- 2022年01月21日17:31:16 何威 将type参数上移一层
ALTER TABLE `
im_message
`
ALTER
TABLE
`im_message`
ADD COLUMN `
msg_type
` int(2) NULL DEFAULT NULL COMMENT '消息类型' AFTER `
send_status
`;
ADD
COLUMN
`msg_type`
int
(
2
)
NULL
DEFAULT
NULL
COMMENT
'消息类型'
AFTER
`send_status`
;
\ No newline at end of file
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment