Skip to content

Commit f0a60e9

Browse files
committed
ci:优化 Maven 缓存配置并调整数据库结构
- 更新 Maven 缓存配置,提高构建效率 - 添加 im_conversation记录,更新 im_user 记录 - 删除 im_conversation_seq、im_device_pts、im_user_pts 表 - 调整 im_friend 表结构,将 conversation_type 字段改为可空
1 parent 6290dde commit f0a60e9

File tree

4 files changed

+17
-81
lines changed

4 files changed

+17
-81
lines changed

.github/workflows/ci.yml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,22 +23,24 @@ jobs:
2323
with:
2424
java-version: '17'
2525
distribution: 'temurin'
26-
cache: 'maven'
26+
cache: maven
2727

28-
- name: Cache Maven dependencies
28+
# 更加优化的Maven缓存配置
29+
- name: Cache Maven packages
2930
uses: actions/cache@v4
3031
with:
31-
path: ~/.m2/repository
32-
key: maven-${{ runner.os }}-${{ hashFiles('**/pom.xml') }}
32+
path: |
33+
~/.m2/repository
34+
.m2/repository
35+
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
3336
restore-keys: |
34-
maven-${{ runner.os }}-
35-
maven-
37+
${{ runner.os }}-maven-
3638
3739
# - name: Initialize Maven project with flatten plugin
3840
# run: mvn flatten:flatten
3941

4042
- name: Build with Maven
41-
run: mvn clean package -DskipTests -Pprod
43+
run: mvn -B clean package -DskipTests -Pprod -Dmaven.repo.local=.m2/repository
4244

4345
- name: Upload Artifacts
4446
uses: actions/upload-artifact@v4
17.9 KB
Binary file not shown.

sql/im_chat_ai.sql

Lines changed: 8 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,14 @@
11
/*
22
Navicat Premium Dump SQL
3-
4-
Source Server : txy-my
53
Source Server Type : MySQL
64
Source Server Version : 50744 (5.7.44)
7-
Source Host : 106.52.81.52:3306
85
Source Schema : im_chat_ai
96
107
Target Server Type : MySQL
118
Target Server Version : 50744 (5.7.44)
129
File Encoding : 65001
1310
14-
Date: 21/01/2025 17:23:37
11+
Date: 07/04/2025 14:36:18
1512
*/
1613

1714
SET NAMES utf8mb4;
@@ -129,6 +126,9 @@ CREATE TABLE `im_conversation` (
129126
-- ----------------------------
130127
-- Records of im_conversation
131128
-- ----------------------------
129+
INSERT INTO `im_conversation` VALUES (1907311745947430913, NULL, 8, '2025-04-02 13:58:51', '2025-04-02 13:58:51', 1, 0, NULL, NULL, 1907255698100682753, 1907255698100682753);
130+
INSERT INTO `im_conversation` VALUES (1907311828306784258, NULL, 8, '2025-04-02 13:59:11', '2025-04-02 13:59:11', 1, 0, NULL, NULL, 1907255698100682753, 1907255698100682753);
131+
INSERT INTO `im_conversation` VALUES (1907312001611231234, NULL, 8, '2025-04-02 13:59:52', '2025-04-02 13:59:52', 1, 0, NULL, NULL, 1907255698100682753, 1907255698100682753);
132132

133133
-- ----------------------------
134134
-- Table structure for im_conversation_member
@@ -185,33 +185,13 @@ CREATE TABLE `im_conversation_recent` (
185185
`update_by` bigint(20) NULL DEFAULT NULL,
186186
`update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
187187
PRIMARY KEY (`id`) USING BTREE,
188-
UNIQUE INDEX `uk_user_conversation`(`fk_user_id`, `fk_conversation_id`) USING BTREE COMMENT '用户会话唯一索引',
189188
INDEX `idx_user_msg_time`(`fk_user_id`, `last_msg_time`) USING BTREE
190189
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '首页对话列表' ROW_FORMAT = DYNAMIC;
191190

192191
-- ----------------------------
193192
-- Records of im_conversation_recent
194193
-- ----------------------------
195194

196-
-- ----------------------------
197-
-- Table structure for im_conversation_seq
198-
-- ----------------------------
199-
DROP TABLE IF EXISTS `im_conversation_seq`;
200-
CREATE TABLE `im_conversation_seq` (
201-
`conversation_id` bigint(20) UNSIGNED NOT NULL COMMENT '主键id',
202-
`conversation_seq` bigint(20) NOT NULL COMMENT '会话当前序列号',
203-
`create_dept` bigint(20) NULL DEFAULT NULL,
204-
`create_by` bigint(20) NULL DEFAULT NULL,
205-
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
206-
`update_by` bigint(20) NULL DEFAULT NULL,
207-
`update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
208-
PRIMARY KEY (`conversation_id`) USING BTREE
209-
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '会话序列号表' ROW_FORMAT = DYNAMIC;
210-
211-
-- ----------------------------
212-
-- Records of im_conversation_seq
213-
-- ----------------------------
214-
215195
-- ----------------------------
216196
-- Table structure for im_device
217197
-- ----------------------------
@@ -239,30 +219,6 @@ CREATE TABLE `im_device` (
239219
-- Records of im_device
240220
-- ----------------------------
241221

242-
-- ----------------------------
243-
-- Table structure for im_device_pts
244-
-- ----------------------------
245-
DROP TABLE IF EXISTS `im_device_pts`;
246-
CREATE TABLE `im_device_pts` (
247-
`id` bigint(20) UNSIGNED NOT NULL COMMENT '主键id',
248-
`fk_user_id` bigint(20) NOT NULL COMMENT '用户id',
249-
`fk_device_id` bigint(20) NOT NULL COMMENT '设备id',
250-
`update_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
251-
`max_pts` bigint(20) NULL DEFAULT NULL COMMENT '用户某设备当前最大位点',
252-
`deleted` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否删除 0-未删除 1-已删除',
253-
`extras` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '可选 自定义属性,供开发者扩展使用',
254-
`create_dept` bigint(20) NULL DEFAULT NULL,
255-
`create_by` bigint(20) NULL DEFAULT NULL,
256-
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
257-
`update_by` bigint(20) NULL DEFAULT NULL,
258-
PRIMARY KEY (`id`) USING BTREE,
259-
INDEX `user_id`(`fk_user_id`) USING BTREE
260-
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '设备pts表' ROW_FORMAT = DYNAMIC;
261-
262-
-- ----------------------------
263-
-- Records of im_device_pts
264-
-- ----------------------------
265-
266222
-- ----------------------------
267223
-- Table structure for im_friend
268224
-- ----------------------------
@@ -458,7 +414,7 @@ CREATE TABLE `im_message` (
458414
`extras` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '可选 自定义属性,供开发者扩展使用',
459415
`app_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '应用ID',
460416
`tenant_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '租户ID',
461-
`conversation_type` tinyint(4) NOT NULL COMMENT '会话类型:1单聊,2群聊,3聊天室',
417+
`conversation_type` tinyint(4) NULL DEFAULT NULL COMMENT '会话类型:1单聊,2群聊,3聊天室',
462418
`to_uid` bigint(20) NULL DEFAULT NULL COMMENT '接收者ID(单聊必填)',
463419
`cmd` int(11) NOT NULL COMMENT '命令类型',
464420
`persistent` tinyint(1) NULL DEFAULT 1 COMMENT '是否持久化',
@@ -712,28 +668,9 @@ CREATE TABLE `im_user` (
712668
-- ----------------------------
713669
-- Records of im_user
714670
-- ----------------------------
715-
INSERT INTO `im_user` VALUES (398120364340178, NULL, NULL, NULL, NULL, NULL, 3, NULL, '言静怡', '2025-01-16 15:25:37', NULL, '2025-01-16 15:25:37', 'irure est', 1, NULL, NULL, NULL, 0, NULL, NULL, NULL, NULL);
716-
717-
-- ----------------------------
718-
-- Table structure for im_user_pts
719-
-- ----------------------------
720-
DROP TABLE IF EXISTS `im_user_pts`;
721-
CREATE TABLE `im_user_pts` (
722-
`user_id` bigint(20) UNSIGNED NOT NULL COMMENT '主键id',
723-
`pts` bigint(20) NULL DEFAULT NULL COMMENT '当前最大的同步位点',
724-
`deleted` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否删除 0-未删除 1-已删除',
725-
`extras` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '可选 自定义属性,供开发者扩展使用',
726-
`create_dept` bigint(20) NULL DEFAULT NULL,
727-
`create_by` bigint(20) NULL DEFAULT NULL,
728-
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
729-
`update_by` bigint(20) NULL DEFAULT NULL,
730-
`update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
731-
PRIMARY KEY (`user_id`) USING BTREE
732-
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户pts表' ROW_FORMAT = DYNAMIC;
733-
734-
-- ----------------------------
735-
-- Records of im_user_pts
736-
-- ----------------------------
671+
INSERT INTO `im_user` VALUES (1907255420609724417, NULL, NULL, NULL, NULL, NULL, 3, NULL, '泥子豪', '2025-04-02 10:15:02', NULL, '2025-04-02 10:15:02', 'irure est', 1, NULL, NULL, NULL, 0, NULL, NULL, NULL, NULL);
672+
INSERT INTO `im_user` VALUES (1907255603389104129, NULL, NULL, NULL, NULL, NULL, 3, NULL, '符国栋', '2025-04-02 10:15:46', NULL, '2025-04-02 10:15:46', 'irure est', 1, NULL, NULL, NULL, 0, NULL, NULL, NULL, NULL);
673+
INSERT INTO `im_user` VALUES (1907255698100682753, NULL, NULL, NULL, NULL, NULL, 3, NULL, '俞三锋', '2025-04-02 10:16:08', NULL, '2025-04-02 10:16:08', 'irure est', 1, NULL, NULL, NULL, 0, NULL, NULL, NULL, NULL);
737674

738675
-- ----------------------------
739676
-- Table structure for im_user_status

sql/ry-cloud.sql

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
/*
22
Navicat Premium Dump SQL
3-
4-
Source Server : txy-my
53
Source Server Type : MySQL
64
Source Server Version : 50744 (5.7.44)
7-
Source Host : 106.52.81.52:3306
85
Source Schema : ry-cloud
96
107
Target Server Type : MySQL

0 commit comments

Comments
 (0)