feat(sql): 移除巡检任务记录表中的任务ID字段

- 删除 `v_inspection_task_record` 表中的 `task_id` 字段
- 简化表结构,减少冗余关联字段- 调整表字段注释以适应新的数据模型
This commit is contained in:
2025-09-30 10:46:57 +08:00
parent 4711883466
commit 9508468265

View File

@@ -1277,7 +1277,6 @@ INSERT INTO `v_inspection_task` VALUES (5, '垃圾巡检测试', 3, '192.168.1.2
DROP TABLE IF EXISTS `v_inspection_task_record`; DROP TABLE IF EXISTS `v_inspection_task_record`;
CREATE TABLE `v_inspection_task_record` ( CREATE TABLE `v_inspection_task_record` (
`record_id` bigint NOT NULL AUTO_INCREMENT COMMENT '记录ID主键', `record_id` bigint NOT NULL AUTO_INCREMENT COMMENT '记录ID主键',
`task_id` bigint NOT NULL COMMENT '关联的巡检任务ID',
`execute_time` datetime NOT NULL COMMENT '执行时间', `execute_time` datetime NOT NULL COMMENT '执行时间',
`duration` int NULL DEFAULT NULL COMMENT '执行时长(秒)', `duration` int NULL DEFAULT NULL COMMENT '执行时长(秒)',
`accessory` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '附件路径,可存储相关图片或文件', `accessory` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '附件路径,可存储相关图片或文件',