-- 2024.10.17 增加表：atu_plan_task_record
CREATE TABLE atu_execute_plan.atu_plan_task_record (
	`id` VARCHAR(32) NOT NULL COMMENT '记录id' COLLATE 'utf8mb4_general_ci',
	`task_id` VARCHAR(32) NULL DEFAULT NULL COMMENT '任务id' COLLATE 'utf8mb4_general_ci',
	`batch_id` VARCHAR(32) NULL DEFAULT NULL COMMENT '批次id' COLLATE 'utf8mb4_general_ci',
	`exec_idx` INT(11) NULL DEFAULT '1' COMMENT '执行序号',
	`start_time` BIGINT(20) NULL DEFAULT NULL COMMENT '开始时间',
	`end_time` BIGINT(20) NULL DEFAULT NULL COMMENT '结束时间',
	`execute_type` VARCHAR(10) NULL DEFAULT '0' COMMENT '执行类型，0-正常执行|1-自动重试|2-手动重试' COLLATE 'utf8mb4_general_ci',
	`status` VARCHAR(10) NULL DEFAULT '0' COMMENT '状态' COLLATE 'utf8mb4_general_ci',
	`error_msg` TEXT(65535) NULL DEFAULT NULL COMMENT '错误信息' COLLATE 'utf8mb4_general_ci',
	`video_url` VARCHAR(255) NULL DEFAULT NULL COMMENT '视频地址' COLLATE 'utf8mb4_general_ci',
	`exec_result_file` VARCHAR(255) NULL DEFAULT NULL COMMENT '执行结果文件' COLLATE 'utf8mb4_general_ci',
	PRIMARY KEY (`id`) USING BTREE
)
COMMENT='任务执行记录表'
COLLATE='utf8mb4_general_ci'
ENGINE=InnoDB
;
-- 2024.10.17 修改表，atu_plan_info 增加字段restry_strategy重试策略
ALTER TABLE atu_execute_plan.atu_plan_info
	ADD COLUMN `retry_strategy` VARCHAR(10) NULL DEFAULT NULL COMMENT '重试策略 1-失败任务打包重试|2-任务失败立刻重试' COLLATE 'utf8_general_ci' AFTER `fail_retry_count`;