mirror of
https://gitee.com/log4j/pig.git
synced 2024-12-23 05:00:23 +08:00
503 lines
30 KiB
MySQL
503 lines
30 KiB
MySQL
|
DROP DATABASE IF EXISTS `pig_job`;
|
|||
|
|
|||
|
CREATE DATABASE `pig_job` DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;
|
|||
|
|
|||
|
USE pig_job;
|
|||
|
|
|||
|
SET NAMES utf8mb4;
|
|||
|
SET FOREIGN_KEY_CHECKS = 0;
|
|||
|
|
|||
|
-- ----------------------------
|
|||
|
-- Table structure for qrtz_blob_triggers
|
|||
|
-- ----------------------------
|
|||
|
DROP TABLE IF EXISTS `qrtz_blob_triggers`;
|
|||
|
CREATE TABLE `qrtz_blob_triggers` (
|
|||
|
`sched_name` varchar(120) CHARACTER SET utf8 NOT NULL,
|
|||
|
`trigger_name` varchar(200) CHARACTER SET utf8 NOT NULL,
|
|||
|
`trigger_group` varchar(200) CHARACTER SET utf8 NOT NULL,
|
|||
|
`blob_data` blob,
|
|||
|
PRIMARY KEY (`sched_name`,`trigger_name`,`trigger_group`) USING BTREE,
|
|||
|
CONSTRAINT `qrtz_blob_triggers_ibfk_1` FOREIGN KEY (`sched_name`, `trigger_name`, `trigger_group`) REFERENCES `qrtz_triggers` (`sched_name`, `trigger_name`, `trigger_group`) ON DELETE RESTRICT ON UPDATE RESTRICT
|
|||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
|||
|
|
|||
|
-- ----------------------------
|
|||
|
-- Records of qrtz_blob_triggers
|
|||
|
-- ----------------------------
|
|||
|
BEGIN;
|
|||
|
COMMIT;
|
|||
|
|
|||
|
-- ----------------------------
|
|||
|
-- Table structure for qrtz_calendars
|
|||
|
-- ----------------------------
|
|||
|
DROP TABLE IF EXISTS `qrtz_calendars`;
|
|||
|
CREATE TABLE `qrtz_calendars` (
|
|||
|
`sched_name` varchar(120) CHARACTER SET utf8 NOT NULL,
|
|||
|
`calendar_name` varchar(200) CHARACTER SET utf8 NOT NULL,
|
|||
|
`calendar` blob NOT NULL,
|
|||
|
PRIMARY KEY (`sched_name`,`calendar_name`) USING BTREE
|
|||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
|||
|
|
|||
|
-- ----------------------------
|
|||
|
-- Records of qrtz_calendars
|
|||
|
-- ----------------------------
|
|||
|
BEGIN;
|
|||
|
COMMIT;
|
|||
|
|
|||
|
-- ----------------------------
|
|||
|
-- Table structure for qrtz_cron_triggers
|
|||
|
-- ----------------------------
|
|||
|
DROP TABLE IF EXISTS `qrtz_cron_triggers`;
|
|||
|
CREATE TABLE `qrtz_cron_triggers` (
|
|||
|
`sched_name` varchar(120) CHARACTER SET utf8 NOT NULL,
|
|||
|
`trigger_name` varchar(200) CHARACTER SET utf8 NOT NULL,
|
|||
|
`trigger_group` varchar(200) CHARACTER SET utf8 NOT NULL,
|
|||
|
`cron_expression` varchar(200) CHARACTER SET utf8 NOT NULL,
|
|||
|
`time_zone_id` varchar(80) CHARACTER SET utf8 DEFAULT NULL,
|
|||
|
PRIMARY KEY (`sched_name`,`trigger_name`,`trigger_group`) USING BTREE,
|
|||
|
CONSTRAINT `qrtz_cron_triggers_ibfk_1` FOREIGN KEY (`sched_name`, `trigger_name`, `trigger_group`) REFERENCES `qrtz_triggers` (`sched_name`, `trigger_name`, `trigger_group`) ON DELETE RESTRICT ON UPDATE RESTRICT
|
|||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
|||
|
|
|||
|
-- ----------------------------
|
|||
|
-- Records of qrtz_cron_triggers
|
|||
|
-- ----------------------------
|
|||
|
BEGIN;
|
|||
|
COMMIT;
|
|||
|
|
|||
|
-- ----------------------------
|
|||
|
-- Table structure for qrtz_fired_triggers
|
|||
|
-- ----------------------------
|
|||
|
DROP TABLE IF EXISTS `qrtz_fired_triggers`;
|
|||
|
CREATE TABLE `qrtz_fired_triggers` (
|
|||
|
`sched_name` varchar(120) CHARACTER SET utf8 NOT NULL,
|
|||
|
`entry_id` varchar(95) CHARACTER SET utf8 NOT NULL,
|
|||
|
`trigger_name` varchar(200) CHARACTER SET utf8 NOT NULL,
|
|||
|
`trigger_group` varchar(200) CHARACTER SET utf8 NOT NULL,
|
|||
|
`instance_name` varchar(200) CHARACTER SET utf8 NOT NULL,
|
|||
|
`fired_time` bigint NOT NULL,
|
|||
|
`sched_time` bigint NOT NULL,
|
|||
|
`priority` int NOT NULL,
|
|||
|
`state` varchar(16) CHARACTER SET utf8 NOT NULL,
|
|||
|
`job_name` varchar(200) CHARACTER SET utf8 DEFAULT NULL,
|
|||
|
`job_group` varchar(200) CHARACTER SET utf8 DEFAULT NULL,
|
|||
|
`is_nonconcurrent` varchar(1) CHARACTER SET utf8 DEFAULT NULL,
|
|||
|
`requests_recovery` varchar(1) CHARACTER SET utf8 DEFAULT NULL,
|
|||
|
PRIMARY KEY (`sched_name`,`entry_id`) USING BTREE
|
|||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
|||
|
|
|||
|
-- ----------------------------
|
|||
|
-- Records of qrtz_fired_triggers
|
|||
|
-- ----------------------------
|
|||
|
BEGIN;
|
|||
|
COMMIT;
|
|||
|
|
|||
|
-- ----------------------------
|
|||
|
-- Table structure for qrtz_job_details
|
|||
|
-- ----------------------------
|
|||
|
DROP TABLE IF EXISTS `qrtz_job_details`;
|
|||
|
CREATE TABLE `qrtz_job_details` (
|
|||
|
`sched_name` varchar(120) CHARACTER SET utf8 NOT NULL,
|
|||
|
`job_name` varchar(200) CHARACTER SET utf8 NOT NULL,
|
|||
|
`job_group` varchar(200) CHARACTER SET utf8 NOT NULL,
|
|||
|
`description` varchar(250) CHARACTER SET utf8 DEFAULT NULL,
|
|||
|
`job_class_name` varchar(250) CHARACTER SET utf8 NOT NULL,
|
|||
|
`is_durable` varchar(1) CHARACTER SET utf8 NOT NULL,
|
|||
|
`is_nonconcurrent` varchar(1) CHARACTER SET utf8 NOT NULL,
|
|||
|
`is_update_data` varchar(1) CHARACTER SET utf8 NOT NULL,
|
|||
|
`requests_recovery` varchar(1) CHARACTER SET utf8 NOT NULL,
|
|||
|
`job_data` blob,
|
|||
|
PRIMARY KEY (`sched_name`,`job_name`,`job_group`) USING BTREE
|
|||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
|||
|
|
|||
|
-- ----------------------------
|
|||
|
-- Records of qrtz_job_details
|
|||
|
-- ----------------------------
|
|||
|
BEGIN;
|
|||
|
COMMIT;
|
|||
|
|
|||
|
-- ----------------------------
|
|||
|
-- Table structure for qrtz_locks
|
|||
|
-- ----------------------------
|
|||
|
DROP TABLE IF EXISTS `qrtz_locks`;
|
|||
|
CREATE TABLE `qrtz_locks` (
|
|||
|
`sched_name` varchar(120) CHARACTER SET utf8 NOT NULL,
|
|||
|
`lock_name` varchar(40) CHARACTER SET utf8 NOT NULL,
|
|||
|
PRIMARY KEY (`sched_name`,`lock_name`) USING BTREE
|
|||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
|||
|
|
|||
|
-- ----------------------------
|
|||
|
-- Records of qrtz_locks
|
|||
|
-- ----------------------------
|
|||
|
BEGIN;
|
|||
|
COMMIT;
|
|||
|
|
|||
|
-- ----------------------------
|
|||
|
-- Table structure for qrtz_paused_trigger_grps
|
|||
|
-- ----------------------------
|
|||
|
DROP TABLE IF EXISTS `qrtz_paused_trigger_grps`;
|
|||
|
CREATE TABLE `qrtz_paused_trigger_grps` (
|
|||
|
`sched_name` varchar(120) CHARACTER SET utf8 NOT NULL,
|
|||
|
`trigger_group` varchar(200) CHARACTER SET utf8 NOT NULL,
|
|||
|
PRIMARY KEY (`sched_name`,`trigger_group`) USING BTREE
|
|||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
|||
|
|
|||
|
-- ----------------------------
|
|||
|
-- Records of qrtz_paused_trigger_grps
|
|||
|
-- ----------------------------
|
|||
|
BEGIN;
|
|||
|
COMMIT;
|
|||
|
|
|||
|
-- ----------------------------
|
|||
|
-- Table structure for qrtz_scheduler_state
|
|||
|
-- ----------------------------
|
|||
|
DROP TABLE IF EXISTS `qrtz_scheduler_state`;
|
|||
|
CREATE TABLE `qrtz_scheduler_state` (
|
|||
|
`sched_name` varchar(120) CHARACTER SET utf8 NOT NULL,
|
|||
|
`instance_name` varchar(200) CHARACTER SET utf8 NOT NULL,
|
|||
|
`last_checkin_time` bigint NOT NULL,
|
|||
|
`checkin_interval` bigint NOT NULL,
|
|||
|
PRIMARY KEY (`sched_name`,`instance_name`) USING BTREE
|
|||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
|||
|
|
|||
|
-- ----------------------------
|
|||
|
-- Records of qrtz_scheduler_state
|
|||
|
-- ----------------------------
|
|||
|
BEGIN;
|
|||
|
COMMIT;
|
|||
|
|
|||
|
-- ----------------------------
|
|||
|
-- Table structure for qrtz_simple_triggers
|
|||
|
-- ----------------------------
|
|||
|
DROP TABLE IF EXISTS `qrtz_simple_triggers`;
|
|||
|
CREATE TABLE `qrtz_simple_triggers` (
|
|||
|
`sched_name` varchar(120) CHARACTER SET utf8 NOT NULL,
|
|||
|
`trigger_name` varchar(200) CHARACTER SET utf8 NOT NULL,
|
|||
|
`trigger_group` varchar(200) CHARACTER SET utf8 NOT NULL,
|
|||
|
`repeat_count` bigint NOT NULL,
|
|||
|
`repeat_interval` bigint NOT NULL,
|
|||
|
`times_triggered` bigint NOT NULL,
|
|||
|
PRIMARY KEY (`sched_name`,`trigger_name`,`trigger_group`) USING BTREE,
|
|||
|
CONSTRAINT `QRTZ_SIMPLE_TRIGGERS_IBFK_1` FOREIGN KEY (`sched_name`, `trigger_name`, `trigger_group`) REFERENCES `qrtz_triggers` (`sched_name`, `trigger_name`, `trigger_group`) ON DELETE RESTRICT ON UPDATE RESTRICT
|
|||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
|||
|
|
|||
|
-- ----------------------------
|
|||
|
-- Records of qrtz_simple_triggers
|
|||
|
-- ----------------------------
|
|||
|
BEGIN;
|
|||
|
COMMIT;
|
|||
|
|
|||
|
-- ----------------------------
|
|||
|
-- Table structure for qrtz_simprop_triggers
|
|||
|
-- ----------------------------
|
|||
|
DROP TABLE IF EXISTS `qrtz_simprop_triggers`;
|
|||
|
CREATE TABLE `qrtz_simprop_triggers` (
|
|||
|
`sched_name` varchar(120) CHARACTER SET utf8 NOT NULL,
|
|||
|
`trigger_name` varchar(200) CHARACTER SET utf8 NOT NULL,
|
|||
|
`trigger_group` varchar(200) CHARACTER SET utf8 NOT NULL,
|
|||
|
`str_prop_1` varchar(512) CHARACTER SET utf8 DEFAULT NULL,
|
|||
|
`str_prop_2` varchar(512) CHARACTER SET utf8 DEFAULT NULL,
|
|||
|
`str_prop_3` varchar(512) CHARACTER SET utf8 DEFAULT NULL,
|
|||
|
`int_prop_1` int DEFAULT NULL,
|
|||
|
`int_prop_2` int DEFAULT NULL,
|
|||
|
`long_prop_1` bigint DEFAULT NULL,
|
|||
|
`long_prop_2` bigint DEFAULT NULL,
|
|||
|
`dec_prop_1` decimal(13,4) DEFAULT NULL,
|
|||
|
`dec_prop_2` decimal(13,4) DEFAULT NULL,
|
|||
|
`bool_prop_1` varchar(1) CHARACTER SET utf8 DEFAULT NULL,
|
|||
|
`bool_prop_2` varchar(1) CHARACTER SET utf8 DEFAULT NULL,
|
|||
|
PRIMARY KEY (`sched_name`,`trigger_name`,`trigger_group`) USING BTREE,
|
|||
|
CONSTRAINT `QRTZ_SIMPROP_TRIGGERS_IBFK_1` FOREIGN KEY (`sched_name`, `trigger_name`, `trigger_group`) REFERENCES `qrtz_triggers` (`sched_name`, `trigger_name`, `trigger_group`) ON DELETE RESTRICT ON UPDATE RESTRICT
|
|||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
|||
|
|
|||
|
-- ----------------------------
|
|||
|
-- Records of qrtz_simprop_triggers
|
|||
|
-- ----------------------------
|
|||
|
BEGIN;
|
|||
|
COMMIT;
|
|||
|
|
|||
|
-- ----------------------------
|
|||
|
-- Table structure for qrtz_triggers
|
|||
|
-- ----------------------------
|
|||
|
DROP TABLE IF EXISTS `qrtz_triggers`;
|
|||
|
CREATE TABLE `qrtz_triggers` (
|
|||
|
`sched_name` varchar(120) CHARACTER SET utf8 NOT NULL,
|
|||
|
`trigger_name` varchar(200) CHARACTER SET utf8 NOT NULL,
|
|||
|
`trigger_group` varchar(200) CHARACTER SET utf8 NOT NULL,
|
|||
|
`job_name` varchar(200) CHARACTER SET utf8 NOT NULL,
|
|||
|
`job_group` varchar(200) CHARACTER SET utf8 NOT NULL,
|
|||
|
`description` varchar(250) CHARACTER SET utf8 DEFAULT NULL,
|
|||
|
`next_fire_time` bigint DEFAULT NULL,
|
|||
|
`prev_fire_time` bigint DEFAULT NULL,
|
|||
|
`priority` int DEFAULT NULL,
|
|||
|
`trigger_state` varchar(16) CHARACTER SET utf8 NOT NULL,
|
|||
|
`trigger_type` varchar(8) CHARACTER SET utf8 NOT NULL,
|
|||
|
`start_time` bigint NOT NULL,
|
|||
|
`end_time` bigint DEFAULT NULL,
|
|||
|
`calendar_name` varchar(200) CHARACTER SET utf8 DEFAULT NULL,
|
|||
|
`misfire_instr` smallint DEFAULT NULL,
|
|||
|
`job_data` blob,
|
|||
|
PRIMARY KEY (`sched_name`,`trigger_name`,`trigger_group`) USING BTREE,
|
|||
|
KEY `sched_name` (`sched_name`,`job_name`,`job_group`) USING BTREE,
|
|||
|
CONSTRAINT `qrtz_triggers_ibfk_1` FOREIGN KEY (`sched_name`, `job_name`, `job_group`) REFERENCES `qrtz_job_details` (`sched_name`, `job_name`, `job_group`) ON DELETE RESTRICT ON UPDATE RESTRICT
|
|||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
|||
|
|
|||
|
-- ----------------------------
|
|||
|
-- Records of qrtz_triggers
|
|||
|
-- ----------------------------
|
|||
|
BEGIN;
|
|||
|
COMMIT;
|
|||
|
|
|||
|
-- ----------------------------
|
|||
|
-- Table structure for sys_job
|
|||
|
-- ----------------------------
|
|||
|
DROP TABLE IF EXISTS `sys_job`;
|
|||
|
CREATE TABLE `sys_job` (
|
|||
|
`job_id` bigint NOT NULL COMMENT '任务id',
|
|||
|
`job_name` varchar(64) CHARACTER SET utf8mb4 NOT NULL COMMENT '任务名称',
|
|||
|
`job_group` varchar(64) CHARACTER SET utf8mb4 NOT NULL COMMENT '任务组名',
|
|||
|
`job_order` char(1) CHARACTER SET utf8mb4 DEFAULT '1' COMMENT '组内执行顺利,值越大执行优先级越高,最大值9,最小值1',
|
|||
|
`job_type` char(1) CHARACTER SET utf8mb4 NOT NULL DEFAULT '1' COMMENT '1、java类;2、spring bean名称;3、rest调用;4、jar调用;9其他',
|
|||
|
`execute_path` varchar(500) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT 'job_type=3时,rest调用地址,仅支持rest get协议,需要增加String返回值,0成功,1失败;job_type=4时,jar路径;其它值为空',
|
|||
|
`class_name` varchar(500) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT 'job_type=1时,类完整路径;job_type=2时,spring bean名称;其它值为空',
|
|||
|
`method_name` varchar(500) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '任务方法',
|
|||
|
`method_params_value` varchar(2000) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '参数值',
|
|||
|
`cron_expression` varchar(255) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT 'cron执行表达式',
|
|||
|
`misfire_policy` varchar(20) CHARACTER SET utf8mb4 DEFAULT '3' COMMENT '错失执行策略(1错失周期立即执行 2错失周期执行一次 3下周期执行)',
|
|||
|
`job_tenant_type` char(1) CHARACTER SET utf8mb4 DEFAULT '1' COMMENT '1、多租户任务;2、非多租户任务',
|
|||
|
`job_status` char(1) CHARACTER SET utf8mb4 DEFAULT '0' COMMENT '状态(1、未发布;2、运行中;3、暂停;4、删除;)',
|
|||
|
`job_execute_status` char(1) CHARACTER SET utf8mb4 DEFAULT '0' COMMENT '状态(0正常 1异常)',
|
|||
|
`create_by` varchar(64) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '创建者',
|
|||
|
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
|||
|
`update_by` varchar(64) CHARACTER SET utf8mb4 DEFAULT '' COMMENT '更新者',
|
|||
|
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
|
|||
|
`start_time` timestamp NULL DEFAULT NULL COMMENT '初次执行时间',
|
|||
|
`previous_time` timestamp NULL DEFAULT NULL COMMENT '上次执行时间',
|
|||
|
`next_time` timestamp NULL DEFAULT NULL COMMENT '下次执行时间',
|
|||
|
`remark` varchar(500) CHARACTER SET utf8mb4 DEFAULT '' COMMENT '备注信息',
|
|||
|
PRIMARY KEY (`job_id`,`job_name`,`job_group`) USING BTREE
|
|||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='定时任务调度表';
|
|||
|
|
|||
|
-- ----------------------------
|
|||
|
-- Records of sys_job
|
|||
|
-- ----------------------------
|
|||
|
BEGIN;
|
|||
|
COMMIT;
|
|||
|
|
|||
|
-- ----------------------------
|
|||
|
-- Table structure for sys_job_log
|
|||
|
-- ----------------------------
|
|||
|
DROP TABLE IF EXISTS `sys_job_log`;
|
|||
|
CREATE TABLE `sys_job_log` (
|
|||
|
`job_log_id` bigint NOT NULL COMMENT '任务日志ID',
|
|||
|
`job_id` bigint NOT NULL COMMENT '任务id',
|
|||
|
`job_name` varchar(64) CHARACTER SET utf8 DEFAULT NULL COMMENT '任务名称',
|
|||
|
`job_group` varchar(64) CHARACTER SET utf8 DEFAULT NULL COMMENT '任务组名',
|
|||
|
`job_order` char(1) CHARACTER SET utf8 DEFAULT NULL COMMENT '组内执行顺利,值越大执行优先级越高,最大值9,最小值1',
|
|||
|
`job_type` char(1) CHARACTER SET utf8 NOT NULL DEFAULT '1' COMMENT '1、java类;2、spring bean名称;3、rest调用;4、jar调用;9其他',
|
|||
|
`execute_path` varchar(500) CHARACTER SET utf8 DEFAULT NULL COMMENT 'job_type=3时,rest调用地址,仅支持post协议;job_type=4时,jar路径;其它值为空',
|
|||
|
`class_name` varchar(500) CHARACTER SET utf8 DEFAULT NULL COMMENT 'job_type=1时,类完整路径;job_type=2时,spring bean名称;其它值为空',
|
|||
|
`method_name` varchar(500) CHARACTER SET utf8 DEFAULT NULL COMMENT '任务方法',
|
|||
|
`method_params_value` varchar(2000) CHARACTER SET utf8 DEFAULT NULL COMMENT '参数值',
|
|||
|
`cron_expression` varchar(255) CHARACTER SET utf8 DEFAULT NULL COMMENT 'cron执行表达式',
|
|||
|
`job_message` varchar(500) CHARACTER SET utf8 DEFAULT NULL COMMENT '日志信息',
|
|||
|
`job_log_status` char(1) CHARACTER SET utf8 DEFAULT '0' COMMENT '执行状态(0正常 1失败)',
|
|||
|
`execute_time` varchar(30) CHARACTER SET utf8 DEFAULT NULL COMMENT '执行时间',
|
|||
|
`exception_info` varchar(2000) CHARACTER SET utf8 DEFAULT '' COMMENT '异常信息',
|
|||
|
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
|||
|
PRIMARY KEY (`job_log_id`) USING BTREE
|
|||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='定时任务执行日志表';
|
|||
|
|
|||
|
-- ----------------------------
|
|||
|
-- Records of sys_job_log
|
|||
|
-- ----------------------------
|
|||
|
BEGIN;
|
|||
|
COMMIT;
|
|||
|
|
|||
|
-- ----------------------------
|
|||
|
-- Table structure for xxl_job_group
|
|||
|
-- ----------------------------
|
|||
|
DROP TABLE IF EXISTS `xxl_job_group`;
|
|||
|
CREATE TABLE `xxl_job_group` (
|
|||
|
`id` int NOT NULL AUTO_INCREMENT,
|
|||
|
`app_name` varchar(64) CHARACTER SET utf8mb4 NOT NULL COMMENT '执行器AppName',
|
|||
|
`title` varchar(12) CHARACTER SET utf8mb4 NOT NULL COMMENT '执行器名称',
|
|||
|
`address_type` tinyint NOT NULL DEFAULT '0' COMMENT '执行器地址类型:0=自动注册、1=手动录入',
|
|||
|
`address_list` text CHARACTER SET utf8mb4 COMMENT '执行器地址列表,多地址逗号分隔',
|
|||
|
`update_time` datetime DEFAULT NULL,
|
|||
|
PRIMARY KEY (`id`) USING BTREE
|
|||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
|||
|
|
|||
|
-- ----------------------------
|
|||
|
-- Records of xxl_job_group
|
|||
|
-- ----------------------------
|
|||
|
BEGIN;
|
|||
|
COMMIT;
|
|||
|
|
|||
|
-- ----------------------------
|
|||
|
-- Table structure for xxl_job_info
|
|||
|
-- ----------------------------
|
|||
|
DROP TABLE IF EXISTS `xxl_job_info`;
|
|||
|
CREATE TABLE `xxl_job_info` (
|
|||
|
`id` int NOT NULL AUTO_INCREMENT,
|
|||
|
`job_group` int NOT NULL COMMENT '执行器主键ID',
|
|||
|
`job_desc` varchar(255) CHARACTER SET utf8mb4 NOT NULL,
|
|||
|
`add_time` datetime DEFAULT NULL,
|
|||
|
`update_time` datetime DEFAULT NULL,
|
|||
|
`author` varchar(64) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '作者',
|
|||
|
`alarm_email` varchar(255) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '报警邮件',
|
|||
|
`schedule_type` varchar(50) CHARACTER SET utf8mb4 NOT NULL DEFAULT 'NONE' COMMENT '调度类型',
|
|||
|
`schedule_conf` varchar(128) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '调度配置,值含义取决于调度类型',
|
|||
|
`misfire_strategy` varchar(50) CHARACTER SET utf8mb4 NOT NULL DEFAULT 'DO_NOTHING' COMMENT '调度过期策略',
|
|||
|
`executor_route_strategy` varchar(50) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '执行器路由策略',
|
|||
|
`executor_handler` varchar(255) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '执行器任务handler',
|
|||
|
`executor_param` varchar(512) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '执行器任务参数',
|
|||
|
`executor_block_strategy` varchar(50) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '阻塞处理策略',
|
|||
|
`executor_timeout` int NOT NULL DEFAULT '0' COMMENT '任务执行超时时间,单位秒',
|
|||
|
`executor_fail_retry_count` int NOT NULL DEFAULT '0' COMMENT '失败重试次数',
|
|||
|
`glue_type` varchar(50) CHARACTER SET utf8mb4 NOT NULL COMMENT 'GLUE类型',
|
|||
|
`glue_source` mediumtext CHARACTER SET utf8mb4 COMMENT 'GLUE源代码',
|
|||
|
`glue_remark` varchar(128) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT 'GLUE备注',
|
|||
|
`glue_updatetime` datetime DEFAULT NULL COMMENT 'GLUE更新时间',
|
|||
|
`child_jobid` varchar(255) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '子任务ID,多个逗号分隔',
|
|||
|
`trigger_status` tinyint NOT NULL DEFAULT '0' COMMENT '调度状态:0-停止,1-运行',
|
|||
|
`trigger_last_time` bigint NOT NULL DEFAULT '0' COMMENT '上次调度时间',
|
|||
|
`trigger_next_time` bigint NOT NULL DEFAULT '0' COMMENT '下次调度时间',
|
|||
|
PRIMARY KEY (`id`) USING BTREE
|
|||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
|||
|
|
|||
|
-- ----------------------------
|
|||
|
-- Records of xxl_job_info
|
|||
|
-- ----------------------------
|
|||
|
BEGIN;
|
|||
|
COMMIT;
|
|||
|
|
|||
|
-- ----------------------------
|
|||
|
-- Table structure for xxl_job_lock
|
|||
|
-- ----------------------------
|
|||
|
DROP TABLE IF EXISTS `xxl_job_lock`;
|
|||
|
CREATE TABLE `xxl_job_lock` (
|
|||
|
`lock_name` varchar(50) CHARACTER SET utf8mb4 NOT NULL COMMENT '锁名称',
|
|||
|
PRIMARY KEY (`lock_name`) USING BTREE
|
|||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
|||
|
|
|||
|
-- ----------------------------
|
|||
|
-- Records of xxl_job_lock
|
|||
|
-- ----------------------------
|
|||
|
BEGIN;
|
|||
|
COMMIT;
|
|||
|
|
|||
|
-- ----------------------------
|
|||
|
-- Table structure for xxl_job_log
|
|||
|
-- ----------------------------
|
|||
|
DROP TABLE IF EXISTS `xxl_job_log`;
|
|||
|
CREATE TABLE `xxl_job_log` (
|
|||
|
`id` bigint NOT NULL AUTO_INCREMENT,
|
|||
|
`job_group` int NOT NULL COMMENT '执行器主键ID',
|
|||
|
`job_id` int NOT NULL COMMENT '任务,主键ID',
|
|||
|
`executor_address` varchar(255) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '执行器地址,本次执行的地址',
|
|||
|
`executor_handler` varchar(255) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '执行器任务handler',
|
|||
|
`executor_param` varchar(512) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '执行器任务参数',
|
|||
|
`executor_sharding_param` varchar(20) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '执行器任务分片参数,格式如 1/2',
|
|||
|
`executor_fail_retry_count` int NOT NULL DEFAULT '0' COMMENT '失败重试次数',
|
|||
|
`trigger_time` datetime DEFAULT NULL COMMENT '调度-时间',
|
|||
|
`trigger_code` int NOT NULL COMMENT '调度-结果',
|
|||
|
`trigger_msg` text CHARACTER SET utf8mb4 COMMENT '调度-日志',
|
|||
|
`handle_time` datetime DEFAULT NULL COMMENT '执行-时间',
|
|||
|
`handle_code` int NOT NULL COMMENT '执行-状态',
|
|||
|
`handle_msg` text CHARACTER SET utf8mb4 COMMENT '执行-日志',
|
|||
|
`alarm_status` tinyint NOT NULL DEFAULT '0' COMMENT '告警状态:0-默认、1-无需告警、2-告警成功、3-告警失败',
|
|||
|
PRIMARY KEY (`id`) USING BTREE,
|
|||
|
KEY `I_trigger_time` (`trigger_time`) USING BTREE,
|
|||
|
KEY `I_handle_code` (`handle_code`) USING BTREE
|
|||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
|||
|
|
|||
|
-- ----------------------------
|
|||
|
-- Records of xxl_job_log
|
|||
|
-- ----------------------------
|
|||
|
BEGIN;
|
|||
|
COMMIT;
|
|||
|
|
|||
|
-- ----------------------------
|
|||
|
-- Table structure for xxl_job_log_report
|
|||
|
-- ----------------------------
|
|||
|
DROP TABLE IF EXISTS `xxl_job_log_report`;
|
|||
|
CREATE TABLE `xxl_job_log_report` (
|
|||
|
`id` int NOT NULL AUTO_INCREMENT,
|
|||
|
`trigger_day` datetime DEFAULT NULL COMMENT '调度-时间',
|
|||
|
`running_count` int NOT NULL DEFAULT '0' COMMENT '运行中-日志数量',
|
|||
|
`suc_count` int NOT NULL DEFAULT '0' COMMENT '执行成功-日志数量',
|
|||
|
`fail_count` int NOT NULL DEFAULT '0' COMMENT '执行失败-日志数量',
|
|||
|
`update_time` datetime DEFAULT NULL,
|
|||
|
PRIMARY KEY (`id`) USING BTREE,
|
|||
|
UNIQUE KEY `i_trigger_day` (`trigger_day`) USING BTREE
|
|||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
|||
|
|
|||
|
-- ----------------------------
|
|||
|
-- Records of xxl_job_log_report
|
|||
|
-- ----------------------------
|
|||
|
BEGIN;
|
|||
|
COMMIT;
|
|||
|
|
|||
|
-- ----------------------------
|
|||
|
-- Table structure for xxl_job_logglue
|
|||
|
-- ----------------------------
|
|||
|
DROP TABLE IF EXISTS `xxl_job_logglue`;
|
|||
|
CREATE TABLE `xxl_job_logglue` (
|
|||
|
`id` int NOT NULL AUTO_INCREMENT,
|
|||
|
`job_id` int NOT NULL COMMENT '任务,主键ID',
|
|||
|
`glue_type` varchar(50) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT 'GLUE类型',
|
|||
|
`glue_source` mediumtext CHARACTER SET utf8mb4 COMMENT 'GLUE源代码',
|
|||
|
`glue_remark` varchar(128) CHARACTER SET utf8mb4 NOT NULL COMMENT 'GLUE备注',
|
|||
|
`add_time` datetime DEFAULT NULL,
|
|||
|
`update_time` datetime DEFAULT NULL,
|
|||
|
PRIMARY KEY (`id`) USING BTREE
|
|||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
|||
|
|
|||
|
-- ----------------------------
|
|||
|
-- Records of xxl_job_logglue
|
|||
|
-- ----------------------------
|
|||
|
BEGIN;
|
|||
|
COMMIT;
|
|||
|
|
|||
|
-- ----------------------------
|
|||
|
-- Table structure for xxl_job_registry
|
|||
|
-- ----------------------------
|
|||
|
DROP TABLE IF EXISTS `xxl_job_registry`;
|
|||
|
CREATE TABLE `xxl_job_registry` (
|
|||
|
`id` int NOT NULL AUTO_INCREMENT,
|
|||
|
`registry_group` varchar(50) CHARACTER SET utf8mb4 NOT NULL,
|
|||
|
`registry_key` varchar(255) CHARACTER SET utf8mb4 NOT NULL,
|
|||
|
`registry_value` varchar(255) CHARACTER SET utf8mb4 NOT NULL,
|
|||
|
`update_time` datetime DEFAULT NULL,
|
|||
|
PRIMARY KEY (`id`) USING BTREE,
|
|||
|
KEY `i_g_k_v` (`registry_group`,`registry_key`,`registry_value`) USING BTREE
|
|||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
|||
|
|
|||
|
-- ----------------------------
|
|||
|
-- Records of xxl_job_registry
|
|||
|
-- ----------------------------
|
|||
|
BEGIN;
|
|||
|
COMMIT;
|
|||
|
|
|||
|
-- ----------------------------
|
|||
|
-- Table structure for xxl_job_user
|
|||
|
-- ----------------------------
|
|||
|
DROP TABLE IF EXISTS `xxl_job_user`;
|
|||
|
CREATE TABLE `xxl_job_user` (
|
|||
|
`id` int NOT NULL AUTO_INCREMENT,
|
|||
|
`username` varchar(50) CHARACTER SET utf8mb4 NOT NULL COMMENT '账号',
|
|||
|
`password` varchar(50) CHARACTER SET utf8mb4 NOT NULL COMMENT '密码',
|
|||
|
`role` tinyint NOT NULL COMMENT '角色:0-普通用户、1-管理员',
|
|||
|
`permission` varchar(255) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '权限:执行器ID列表,多个逗号分割',
|
|||
|
PRIMARY KEY (`id`) USING BTREE,
|
|||
|
UNIQUE KEY `i_username` (`username`) USING BTREE
|
|||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
|||
|
|
|||
|
-- ----------------------------
|
|||
|
-- Records of xxl_job_user
|
|||
|
-- ----------------------------
|
|||
|
BEGIN;
|
|||
|
INSERT INTO `xxl_job_user`(`id`, `username`, `password`, `role`, `permission`) VALUES (1, 'admin', 'e10adc3949ba59abbe56e057f20f883e', 1, NULL);
|
|||
|
COMMIT;
|
|||
|
|
|||
|
SET FOREIGN_KEY_CHECKS = 1;
|