fix: 将im_filemsglinks.msgid字段从INT改为BIGINT适配雪花ID

修复msgid为INT类型无法容纳雪花ID的问题,避免插入时数值溢出导致Kafka消费分区停滞
同时新增数据库 schema 校验逻辑,提前发现不符合要求的字段类型
This commit is contained in:
Austin
2026-10-13 17:07:41 +08:00
parent b126b13b77
commit 43808c36d1
3 changed files with 133 additions and 26 deletions
+1 -1
View File
@@ -467,7 +467,7 @@ CREATE TABLE IF NOT EXISTS `im_filemsglinks` (
`id` int NOT NULL AUTO_INCREMENT,
`createdat` datetime(3) NOT NULL,
`fileid` bigint NOT NULL,
`msgid` int DEFAULT NULL,
`msgid` bigint DEFAULT NULL,
`topic` char(25) DEFAULT NULL,
`userid` bigint DEFAULT NULL,
PRIMARY KEY (`id`),