You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
jeecg-boot/db/tables_xxl_job.sql

120 lines
6.2 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

#
# XXL-JOB v2.2.0
# Copyright (c) 2015-present, xuxueli.
CREATE database if NOT EXISTS `xxl_job` default character set utf8mb4 collate utf8mb4_general_ci;
use `xxl_job`;
SET NAMES utf8mb4;
CREATE TABLE `xxl_job_info` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`job_group` int(11) NOT NULL COMMENT 'ID',
`job_cron` varchar(128) NOT NULL COMMENT 'CRON',
`job_desc` varchar(255) NOT NULL,
`add_time` datetime DEFAULT NULL,
`update_time` datetime DEFAULT NULL,
`author` varchar(64) DEFAULT NULL COMMENT '',
`alarm_email` varchar(255) DEFAULT NULL COMMENT '',
`executor_route_strategy` varchar(50) DEFAULT NULL COMMENT '',
`executor_handler` varchar(255) DEFAULT NULL COMMENT 'handler',
`executor_param` varchar(512) DEFAULT NULL COMMENT '',
`executor_block_strategy` varchar(50) DEFAULT NULL COMMENT '',
`executor_timeout` int(11) NOT NULL DEFAULT '0' COMMENT '',
`executor_fail_retry_count` int(11) NOT NULL DEFAULT '0' COMMENT '',
`glue_type` varchar(50) NOT NULL COMMENT 'GLUE',
`glue_source` mediumtext COMMENT 'GLUE',
`glue_remark` varchar(128) DEFAULT NULL COMMENT 'GLUE',
`glue_updatetime` datetime DEFAULT NULL COMMENT 'GLUE',
`child_jobid` varchar(255) DEFAULT NULL COMMENT 'ID',
`trigger_status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '0-1-',
`trigger_last_time` bigint(13) NOT NULL DEFAULT '0' COMMENT '',
`trigger_next_time` bigint(13) NOT NULL DEFAULT '0' COMMENT '',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE `xxl_job_log` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`job_group` int(11) NOT NULL COMMENT 'ID',
`job_id` int(11) NOT NULL COMMENT 'ID',
`executor_address` varchar(255) DEFAULT NULL COMMENT '',
`executor_handler` varchar(255) DEFAULT NULL COMMENT 'handler',
`executor_param` varchar(512) DEFAULT NULL COMMENT '',
`executor_sharding_param` varchar(20) DEFAULT NULL COMMENT ' 1/2',
`executor_fail_retry_count` int(11) NOT NULL DEFAULT '0' COMMENT '',
`trigger_time` datetime DEFAULT NULL COMMENT '-',
`trigger_code` int(11) NOT NULL COMMENT '-',
`trigger_msg` text COMMENT '-',
`handle_time` datetime DEFAULT NULL COMMENT '-',
`handle_code` int(11) NOT NULL COMMENT '-',
`handle_msg` text COMMENT '-',
`alarm_status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '0-1-2-3-',
PRIMARY KEY (`id`),
KEY `I_trigger_time` (`trigger_time`),
KEY `I_handle_code` (`handle_code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE `xxl_job_log_report` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`trigger_day` datetime DEFAULT NULL COMMENT '-',
`running_count` int(11) NOT NULL DEFAULT '0' COMMENT '-',
`suc_count` int(11) NOT NULL DEFAULT '0' COMMENT '-',
`fail_count` int(11) NOT NULL DEFAULT '0' COMMENT '-',
PRIMARY KEY (`id`),
UNIQUE KEY `i_trigger_day` (`trigger_day`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE `xxl_job_logglue` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`job_id` int(11) NOT NULL COMMENT 'ID',
`glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE',
`glue_source` mediumtext COMMENT 'GLUE',
`glue_remark` varchar(128) NOT NULL COMMENT 'GLUE',
`add_time` datetime DEFAULT NULL,
`update_time` datetime DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE `xxl_job_registry` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`registry_group` varchar(50) NOT NULL,
`registry_key` varchar(255) NOT NULL,
`registry_value` varchar(255) NOT NULL,
`update_time` datetime DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `i_g_k_v` (`registry_group`,`registry_key`,`registry_value`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE `xxl_job_group` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`app_name` varchar(64) NOT NULL COMMENT 'AppName',
`title` varchar(12) NOT NULL COMMENT '',
`address_type` tinyint(4) NOT NULL DEFAULT '0' COMMENT '0=1=',
`address_list` varchar(512) DEFAULT NULL COMMENT '',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE `xxl_job_user` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`username` varchar(50) NOT NULL COMMENT '',
`password` varchar(50) NOT NULL COMMENT '',
`role` tinyint(4) NOT NULL COMMENT '0-1-',
`permission` varchar(255) DEFAULT NULL COMMENT 'ID',
PRIMARY KEY (`id`),
UNIQUE KEY `i_username` (`username`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE `xxl_job_lock` (
`lock_name` varchar(50) NOT NULL COMMENT '',
PRIMARY KEY (`lock_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
INSERT INTO `xxl_job_group`(`id`, `app_name`, `title`, `address_type`, `address_list`) VALUES (1, 'xxl-job-executor-sample', '', 0, NULL);
INSERT INTO `xxl_job_info`(`id`, `job_group`, `job_cron`, `job_desc`, `add_time`, `update_time`, `author`, `alarm_email`, `executor_route_strategy`, `executor_handler`, `executor_param`, `executor_block_strategy`, `executor_timeout`, `executor_fail_retry_count`, `glue_type`, `glue_source`, `glue_remark`, `glue_updatetime`, `child_jobid`) VALUES (1, 1, '0 0 0 * * ? *', '1', '2018-11-03 22:21:31', '2018-11-03 22:21:31', 'XXL', '', 'FIRST', 'demoJobHandler', '', 'SERIAL_EXECUTION', 0, 0, 'BEAN', '', 'GLUE', '2018-11-03 22:21:31', '');
INSERT INTO `xxl_job_user`(`id`, `username`, `password`, `role`, `permission`) VALUES (1, 'admin', 'e10adc3949ba59abbe56e057f20f883e', 1, NULL);
INSERT INTO `xxl_job_lock` ( `lock_name`) VALUES ( 'schedule_lock');
commit;