提交 910f2321 authored 作者: mooncake's avatar mooncake

update

上级 e174fe94
......@@ -3,34 +3,33 @@ CREATE TABLE `cron_job` (
`job_name` varchar(128) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '定时任务名称 eg[任务-自动确认订单]',
`job_code` varchar(128) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '定时任务code eg[autoConfirmOrdersTask] mapping[1] [unique]',
`time_spec` varchar(128) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '定时任务时间表达式 eg[0 0 0 * * ?]',
`state` tinyint(1) NOT NULL DEFAULT '1' COMMENT '任务状态 enums[1.RUNNING.运行中 2.NOT_RUNNING.未运行] eg[1]',
`enable` tinyint(1) NOT NULL DEFAULT '1' COMMENT '任务开关 enums[1.CLOSE.关闭 2.OPEN.开启] eg[1]',
`state` tinyint(4) NOT NULL DEFAULT '1' COMMENT '任务状态 enums[1.RUNNING.运行中 -1.NOT_RUNNING.未运行] eg[1]',
`enable` tinyint(1) NOT NULL DEFAULT '1' COMMENT '任务开关 enums[-1.CLOSE.关闭 1.OPEN.开启] eg[1]',
`info` text COLLATE utf8mb4_unicode_ci COMMENT '额外信息 eg[]',
`created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间 eg[2025-01-07 12:20:43]',
`updated_at` datetime DEFAULT NULL COMMENT '修改时间 eg[2025-01-07 12:20:43]',
`updated_at` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间 eg[2025-01-07 12:20:43]',
PRIMARY KEY (`id`),
UNIQUE KEY `unq_job_code` (`job_code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC COMMENT='定时任务';
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC COMMENT='定时任务';
CREATE TABLE `cron_job_log` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID eg[101]',
`job_id` bigint(20) unsigned NOT NULL COMMENT 'job ID eg[101]',
`info` text COLLATE utf8mb4_unicode_ci COMMENT '日志 eg[job occur error...]',
`created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间 eg[2025-01-07 12:20:43]',
`updated_at` datetime DEFAULT NULL COMMENT '修改时间 eg[2025-01-07 12:20:43]',
PRIMARY KEY (`id`),
KEY `idx_jobid_time` (`job_id`,`created_at`)
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID eg[101]',
`job_id` bigint(20) unsigned NOT NULL COMMENT 'job ID eg[101]',
`info` text COLLATE utf8mb4_unicode_ci COMMENT '日志 eg[job occur error...]',
`created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间 eg[2025-01-07 12:20:43]',
`updated_at` datetime DEFAULT NULL COMMENT '修改时间 eg[2025-01-07 12:20:43]',
PRIMARY KEY (`id`),
KEY `idx_jobid_time` (`job_id`,`created_at`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC COMMENT='定时任务日志';
CREATE TABLE `cron_job_record` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID eg[101]',
`job_id` bigint(20) unsigned NOT NULL COMMENT 'job ID eg[101]',
`begin_time` datetime DEFAULT NULL COMMENT '开始时间 eg[2025-01-07 12:20:43]',
`end_time` datetime DEFAULT NULL COMMENT '结束时间 eg[2025-01-07 12:20:43]',
`info` text COLLATE utf8mb4_unicode_ci COMMENT '额外信息 eg[]',
`created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间 eg[2025-01-07 12:20:43]',
`updated_at` datetime DEFAULT NULL COMMENT '修改时间 eg[2025-01-07 12:20:43]',
PRIMARY KEY (`id`),
KEY `idx_jobid_time` (`job_id`,`created_at`)
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID eg[101]',
`job_id` bigint(20) unsigned NOT NULL COMMENT 'job ID eg[101]',
`begin_time` datetime DEFAULT NULL COMMENT '开始时间 eg[2025-01-07 12:20:43]',
`end_time` datetime DEFAULT NULL COMMENT '结束时间 eg[2025-01-07 12:20:43]',
`info` text COLLATE utf8mb4_unicode_ci COMMENT '额外信息 eg[]',
`created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间 eg[2025-01-07 12:20:43]',
`updated_at` datetime DEFAULT NULL COMMENT '修改时间 eg[2025-01-07 12:20:43]',
PRIMARY KEY (`id`),
KEY `idx_jobid_time` (`job_id`,`created_at`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC COMMENT='定时任务运行记录';
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论