fix(config): 统一历史记录与配置的数据库时间来源
- saveHistory 接收调用方传入的数据库时间,不再使用 time.Now() - 更新、删除、回滚先取 dao.Now(),避免取时间失败时产生无效历史 - 历史表 created_at 升级为 datetime(3),新增迁移脚本
This commit is contained in:
@@ -152,7 +152,7 @@ CREATE TABLE `app_config_history` (
|
||||
`type` smallint DEFAULT NULL,
|
||||
`operate` varchar(16) DEFAULT NULL,
|
||||
`contents` text,
|
||||
`created_at` datetime DEFAULT NULL,
|
||||
`created_at` datetime(3) DEFAULT NULL,
|
||||
`created_by` varchar(32) DEFAULT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=39 DEFAULT CHARSET=utf8mb3;
|
||||
|
||||
Reference in New Issue
Block a user