灵活用工后台
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.

преди 4 години
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430
  1. /*
  2. my.cnf 设置数据库表名小写
  3. --lower_case_table_names=1
  4. */
  5. USE pigxx_job;
  6. SET NAMES utf8mb4;
  7. SET FOREIGN_KEY_CHECKS = 0;
  8. -- ----------------------------
  9. -- Table structure for qrtz_blob_triggers
  10. -- ----------------------------
  11. DROP TABLE IF EXISTS `qrtz_blob_triggers`;
  12. CREATE TABLE `qrtz_blob_triggers` (
  13. `sched_name` varchar(120) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  14. `trigger_name` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  15. `trigger_group` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  16. `blob_data` blob,
  17. PRIMARY KEY (`sched_name`,`trigger_name`,`trigger_group`) USING BTREE,
  18. 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
  19. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
  20. -- ----------------------------
  21. -- Table structure for qrtz_calendars
  22. -- ----------------------------
  23. DROP TABLE IF EXISTS `qrtz_calendars`;
  24. CREATE TABLE `qrtz_calendars` (
  25. `sched_name` varchar(120) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  26. `calendar_name` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  27. `calendar` blob NOT NULL,
  28. PRIMARY KEY (`sched_name`,`calendar_name`) USING BTREE
  29. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
  30. -- ----------------------------
  31. -- Table structure for qrtz_cron_triggers
  32. -- ----------------------------
  33. DROP TABLE IF EXISTS `qrtz_cron_triggers`;
  34. CREATE TABLE `qrtz_cron_triggers` (
  35. `sched_name` varchar(120) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  36. `trigger_name` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  37. `trigger_group` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  38. `cron_expression` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  39. `time_zone_id` varchar(80) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  40. PRIMARY KEY (`sched_name`,`trigger_name`,`trigger_group`) USING BTREE,
  41. 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
  42. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
  43. -- ----------------------------
  44. -- Records of qrtz_cron_triggers
  45. -- ----------------------------
  46. BEGIN;
  47. INSERT INTO `qrtz_cron_triggers` VALUES ('clusteredScheduler', '测试任务', 'demo', '0 * * * * ? *', 'Asia/Shanghai');
  48. COMMIT;
  49. -- ----------------------------
  50. -- Table structure for qrtz_fired_triggers
  51. -- ----------------------------
  52. DROP TABLE IF EXISTS `qrtz_fired_triggers`;
  53. CREATE TABLE `qrtz_fired_triggers` (
  54. `sched_name` varchar(120) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  55. `entry_id` varchar(95) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  56. `trigger_name` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  57. `trigger_group` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  58. `instance_name` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  59. `fired_time` bigint(13) NOT NULL,
  60. `sched_time` bigint(13) NOT NULL,
  61. `priority` int(11) NOT NULL,
  62. `state` varchar(16) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  63. `job_name` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  64. `job_group` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  65. `is_nonconcurrent` varchar(1) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  66. `requests_recovery` varchar(1) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  67. PRIMARY KEY (`sched_name`,`entry_id`) USING BTREE
  68. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
  69. -- ----------------------------
  70. -- Table structure for qrtz_job_details
  71. -- ----------------------------
  72. DROP TABLE IF EXISTS `qrtz_job_details`;
  73. CREATE TABLE `qrtz_job_details` (
  74. `sched_name` varchar(120) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  75. `job_name` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  76. `job_group` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  77. `description` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  78. `job_class_name` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  79. `is_durable` varchar(1) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  80. `is_nonconcurrent` varchar(1) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  81. `is_update_data` varchar(1) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  82. `requests_recovery` varchar(1) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  83. `job_data` blob,
  84. PRIMARY KEY (`sched_name`,`job_name`,`job_group`) USING BTREE
  85. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
  86. -- ----------------------------
  87. -- Records of qrtz_job_details
  88. -- ----------------------------
  89. BEGIN;
  90. INSERT INTO `qrtz_job_details` VALUES ('clusteredScheduler', '测试任务', 'demo', NULL, 'com.pig4cloud.pigx.daemon.quartz.config.PigxQuartzFactory', '0', '1', '0', '0', 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C7708000000100000000174000B7363686564756C654A6F627372002E636F6D2E70696734636C6F75642E706967782E6461656D6F6E2E71756172747A2E656E746974792E5379734A6F6200000000000000010200174C0009636C6173734E616D657400124C6A6176612F6C616E672F537472696E673B4C0008637265617465427971007E00094C000A63726561746554696D657400194C6A6176612F74696D652F4C6F63616C4461746554696D653B4C000E63726F6E45787072657373696F6E71007E00094C000B657865637574655061746871007E00094C00106A6F624578656375746553746174757371007E00094C00086A6F6247726F757071007E00094C00056A6F6249647400134C6A6176612F6C616E672F496E74656765723B4C00076A6F624E616D6571007E00094C00086A6F624F7264657271007E00094C00096A6F6253746174757371007E00094C000D6A6F6254656E616E745479706571007E00094C00076A6F625479706571007E00094C000A6D6574686F644E616D6571007E00094C00116D6574686F64506172616D7356616C756571007E00094C000D6D697366697265506F6C69637971007E00094C00086E65787454696D6571007E000A4C000C70726576696F757354696D6571007E000A4C000672656D61726B71007E00094C0009737461727454696D6571007E000A4C000874656E616E74496471007E000B4C0008757064617465427971007E00094C000A75706461746554696D6571007E000A78720035636F6D2E62616F6D69646F752E6D796261746973706C75732E657874656E73696F6E2E6163746976657265636F72642E4D6F64656C0000000000000001020000787074000464656D6F74000561646D696E7372000D6A6176612E74696D652E536572955D84BA1B2248B20C00007870770A05000007E303190E00F17874000D30202A202A202A202A203F202A7400007400013074000464656D6F737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000174000CE6B58BE8AF95E4BBBBE58AA17400013574000133740001317400013274000A64656D6F4D6574686F6474000970696734636C6F7564740001337371007E0010770905000007E3031916E2787371007E0010770A05000007E30319161CCD78740020E6BC94E7A4BA537072696E67204265616EE79A84E5AE9AE697B6E4BBBBE58AA17371007E0010770A05000007E303191600DE7871007E001874000561646D696E7371007E0010770A05000007E303190E00F1787800);
  91. COMMIT;
  92. -- ----------------------------
  93. -- Table structure for qrtz_locks
  94. -- ----------------------------
  95. DROP TABLE IF EXISTS `qrtz_locks`;
  96. CREATE TABLE `qrtz_locks` (
  97. `sched_name` varchar(120) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  98. `lock_name` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  99. PRIMARY KEY (`sched_name`,`lock_name`) USING BTREE
  100. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
  101. -- ----------------------------
  102. -- Table structure for qrtz_paused_trigger_grps
  103. -- ----------------------------
  104. DROP TABLE IF EXISTS `qrtz_paused_trigger_grps`;
  105. CREATE TABLE `qrtz_paused_trigger_grps` (
  106. `sched_name` varchar(120) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  107. `trigger_group` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  108. PRIMARY KEY (`sched_name`,`trigger_group`) USING BTREE
  109. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
  110. -- ----------------------------
  111. -- Table structure for qrtz_scheduler_state
  112. -- ----------------------------
  113. DROP TABLE IF EXISTS `qrtz_scheduler_state`;
  114. CREATE TABLE `qrtz_scheduler_state` (
  115. `sched_name` varchar(120) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  116. `instance_name` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  117. `last_checkin_time` bigint(13) NOT NULL,
  118. `checkin_interval` bigint(13) NOT NULL,
  119. PRIMARY KEY (`sched_name`,`instance_name`) USING BTREE
  120. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
  121. -- ----------------------------
  122. -- Records of qrtz_scheduler_state
  123. -- ----------------------------
  124. BEGIN;
  125. INSERT INTO `qrtz_scheduler_state` VALUES ('clusteredScheduler', 'pigx-register1575868076313', 1575897450356, 10000);
  126. COMMIT;
  127. -- ----------------------------
  128. -- Table structure for qrtz_simple_triggers
  129. -- ----------------------------
  130. DROP TABLE IF EXISTS `qrtz_simple_triggers`;
  131. CREATE TABLE `qrtz_simple_triggers` (
  132. `sched_name` varchar(120) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  133. `trigger_name` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  134. `trigger_group` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  135. `repeat_count` bigint(7) NOT NULL,
  136. `repeat_interval` bigint(12) NOT NULL,
  137. `times_triggered` bigint(10) NOT NULL,
  138. PRIMARY KEY (`sched_name`,`trigger_name`,`trigger_group`) USING BTREE,
  139. 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
  140. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
  141. -- ----------------------------
  142. -- Table structure for qrtz_simprop_triggers
  143. -- ----------------------------
  144. DROP TABLE IF EXISTS `qrtz_simprop_triggers`;
  145. CREATE TABLE `qrtz_simprop_triggers` (
  146. `sched_name` varchar(120) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  147. `trigger_name` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  148. `trigger_group` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  149. `str_prop_1` varchar(512) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  150. `str_prop_2` varchar(512) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  151. `str_prop_3` varchar(512) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  152. `int_prop_1` int(11) DEFAULT NULL,
  153. `int_prop_2` int(11) DEFAULT NULL,
  154. `long_prop_1` bigint(20) DEFAULT NULL,
  155. `long_prop_2` bigint(20) DEFAULT NULL,
  156. `dec_prop_1` decimal(13,4) DEFAULT NULL,
  157. `dec_prop_2` decimal(13,4) DEFAULT NULL,
  158. `bool_prop_1` varchar(1) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  159. `bool_prop_2` varchar(1) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  160. PRIMARY KEY (`sched_name`,`trigger_name`,`trigger_group`) USING BTREE,
  161. 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
  162. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
  163. -- ----------------------------
  164. -- Table structure for qrtz_triggers
  165. -- ----------------------------
  166. DROP TABLE IF EXISTS `qrtz_triggers`;
  167. CREATE TABLE `qrtz_triggers` (
  168. `sched_name` varchar(120) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  169. `trigger_name` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  170. `trigger_group` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  171. `job_name` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  172. `job_group` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  173. `description` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  174. `next_fire_time` bigint(13) DEFAULT NULL,
  175. `prev_fire_time` bigint(13) DEFAULT NULL,
  176. `priority` int(11) DEFAULT NULL,
  177. `trigger_state` varchar(16) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  178. `trigger_type` varchar(8) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  179. `start_time` bigint(13) NOT NULL,
  180. `end_time` bigint(13) DEFAULT NULL,
  181. `calendar_name` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  182. `misfire_instr` smallint(2) DEFAULT NULL,
  183. `job_data` blob,
  184. PRIMARY KEY (`sched_name`,`trigger_name`,`trigger_group`) USING BTREE,
  185. KEY `sched_name` (`sched_name`,`job_name`,`job_group`) USING BTREE,
  186. 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
  187. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
  188. -- ----------------------------
  189. -- Records of qrtz_triggers
  190. -- ----------------------------
  191. BEGIN;
  192. INSERT INTO `qrtz_triggers` VALUES ('clusteredScheduler', '测试任务', 'demo', '测试任务', 'demo', NULL, 1566205080000, 1566205020000, 5, 'PAUSED', 'CRON', 1553564598000, 0, NULL, 2, '');
  193. COMMIT;
  194. -- ----------------------------
  195. -- Table structure for sys_job
  196. -- ----------------------------
  197. DROP TABLE IF EXISTS `sys_job`;
  198. CREATE TABLE `sys_job` (
  199. `job_id` int(11) NOT NULL AUTO_INCREMENT COMMENT '任务id',
  200. `job_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '任务名称',
  201. `job_group` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '任务组名',
  202. `job_order` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '1' COMMENT '组内执行顺利,值越大执行优先级越高,最大值9,最小值1',
  203. `job_type` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '1' COMMENT '1、java类;2、spring bean名称;3、rest调用;4、jar调用;9其他',
  204. `execute_path` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT 'job_type=3时,rest调用地址,仅支持rest get协议,需要增加String返回值,0成功,1失败;job_type=4时,jar路径;其它值为空',
  205. `class_name` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT 'job_type=1时,类完整路径;job_type=2时,spring bean名称;其它值为空',
  206. `method_name` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '任务方法',
  207. `method_params_value` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '参数值',
  208. `cron_expression` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT 'cron执行表达式',
  209. `misfire_policy` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '3' COMMENT '错失执行策略(1错失周期立即执行 2错失周期执行一次 3下周期执行)',
  210. `job_tenant_type` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '1' COMMENT '1、多租户任务;2、非多租户任务',
  211. `job_status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '0' COMMENT '状态(1、未发布;2、运行中;3、暂停;4、删除;)',
  212. `job_execute_status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '0' COMMENT '状态(0正常 1异常)',
  213. `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '创建者',
  214. `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  215. `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '更新者',
  216. `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
  217. `start_time` timestamp NULL DEFAULT NULL COMMENT '初次执行时间',
  218. `previous_time` timestamp NULL DEFAULT NULL COMMENT '上次执行时间',
  219. `next_time` timestamp NULL DEFAULT NULL COMMENT '下次执行时间',
  220. `tenant_id` int(11) DEFAULT '1' COMMENT '租户',
  221. `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '备注信息',
  222. PRIMARY KEY (`job_id`,`job_name`,`job_group`) USING BTREE
  223. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='定时任务调度表';
  224. -- ----------------------------
  225. -- Table structure for sys_job_log
  226. -- ----------------------------
  227. DROP TABLE IF EXISTS `sys_job_log`;
  228. CREATE TABLE `sys_job_log` (
  229. `job_log_id` int(11) NOT NULL AUTO_INCREMENT COMMENT '任务日志ID',
  230. `job_id` int(11) NOT NULL COMMENT '任务id',
  231. `job_name` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '任务名称',
  232. `job_group` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '任务组名',
  233. `job_order` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '组内执行顺利,值越大执行优先级越高,最大值9,最小值1',
  234. `job_type` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '1' COMMENT '1、java类;2、spring bean名称;3、rest调用;4、jar调用;9其他',
  235. `execute_path` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT 'job_type=3时,rest调用地址,仅支持post协议;job_type=4时,jar路径;其它值为空',
  236. `class_name` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT 'job_type=1时,类完整路径;job_type=2时,spring bean名称;其它值为空',
  237. `method_name` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '任务方法',
  238. `method_params_value` varchar(2000) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '参数值',
  239. `cron_expression` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT 'cron执行表达式',
  240. `job_message` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '日志信息',
  241. `job_log_status` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT '0' COMMENT '执行状态(0正常 1失败)',
  242. `execute_time` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '执行时间',
  243. `exception_info` varchar(2000) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT '' COMMENT '异常信息',
  244. `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  245. `tenant_id` int(11) NOT NULL DEFAULT '1' COMMENT '租户id',
  246. PRIMARY KEY (`job_log_id`) USING BTREE
  247. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='定时任务执行日志表';
  248. -- ----------------------------
  249. -- Table structure for xxl_job_group
  250. -- ----------------------------
  251. DROP TABLE IF EXISTS `xxl_job_group`;
  252. CREATE TABLE `xxl_job_group` (
  253. `id` int(11) NOT NULL AUTO_INCREMENT,
  254. `app_name` varchar(64) NOT NULL COMMENT '执行器AppName',
  255. `title` varchar(12) NOT NULL COMMENT '执行器名称',
  256. `order` int(11) NOT NULL DEFAULT '0' COMMENT '排序',
  257. `address_type` tinyint(4) NOT NULL DEFAULT '0' COMMENT '执行器地址类型:0=自动注册、1=手动录入',
  258. `address_list` varchar(512) DEFAULT NULL COMMENT '执行器地址列表,多地址逗号分隔',
  259. PRIMARY KEY (`id`)
  260. ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
  261. -- ----------------------------
  262. -- Records of xxl_job_group
  263. -- ----------------------------
  264. BEGIN;
  265. INSERT INTO `xxl_job_group` VALUES (1, 'xxl-job-executor', '示例执行器', 1, 0, NULL);
  266. COMMIT;
  267. -- ----------------------------
  268. -- Table structure for xxl_job_info
  269. -- ----------------------------
  270. DROP TABLE IF EXISTS `xxl_job_info`;
  271. CREATE TABLE `xxl_job_info` (
  272. `id` int(11) NOT NULL AUTO_INCREMENT,
  273. `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
  274. `job_cron` varchar(128) NOT NULL COMMENT '任务执行CRON',
  275. `job_desc` varchar(255) NOT NULL,
  276. `add_time` datetime DEFAULT NULL,
  277. `update_time` datetime DEFAULT NULL,
  278. `author` varchar(64) DEFAULT NULL COMMENT '作者',
  279. `alarm_email` varchar(255) DEFAULT NULL COMMENT '报警邮件',
  280. `executor_route_strategy` varchar(50) DEFAULT NULL COMMENT '执行器路由策略',
  281. `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
  282. `executor_param` varchar(512) DEFAULT NULL COMMENT '执行器任务参数',
  283. `executor_block_strategy` varchar(50) DEFAULT NULL COMMENT '阻塞处理策略',
  284. `executor_timeout` int(11) NOT NULL DEFAULT '0' COMMENT '任务执行超时时间,单位秒',
  285. `executor_fail_retry_count` int(11) NOT NULL DEFAULT '0' COMMENT '失败重试次数',
  286. `glue_type` varchar(50) NOT NULL COMMENT 'GLUE类型',
  287. `glue_source` mediumtext COMMENT 'GLUE源代码',
  288. `glue_remark` varchar(128) DEFAULT NULL COMMENT 'GLUE备注',
  289. `glue_updatetime` datetime DEFAULT NULL COMMENT 'GLUE更新时间',
  290. `child_jobid` varchar(255) DEFAULT NULL COMMENT '子任务ID,多个逗号分隔',
  291. `trigger_status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '调度状态:0-停止,1-运行',
  292. `trigger_last_time` bigint(13) NOT NULL DEFAULT '0' COMMENT '上次调度时间',
  293. `trigger_next_time` bigint(13) NOT NULL DEFAULT '0' COMMENT '下次调度时间',
  294. PRIMARY KEY (`id`)
  295. ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
  296. -- ----------------------------
  297. -- Records of xxl_job_info
  298. -- ----------------------------
  299. BEGIN;
  300. 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`, `trigger_status`, `trigger_last_time`, `trigger_next_time`) VALUES (1, 1, '0 0 0 * * ? *', '测试任务1', '2018-11-03 22:21:31', '2020-04-15 13:58:35', 'lengleng', '', 'ROUND', 'demoJobHandler', '', 'DISCARD_LATER', 0, 0, 'BEAN', '', 'GLUE代码初始化', '2018-11-03 22:21:31', '', 0, 0, 0);
  301. COMMIT;
  302. -- ----------------------------
  303. -- Table structure for xxl_job_lock
  304. -- ----------------------------
  305. DROP TABLE IF EXISTS `xxl_job_lock`;
  306. CREATE TABLE `xxl_job_lock` (
  307. `lock_name` varchar(50) NOT NULL COMMENT '锁名称',
  308. PRIMARY KEY (`lock_name`)
  309. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
  310. -- ----------------------------
  311. -- Records of xxl_job_lock
  312. -- ----------------------------
  313. BEGIN;
  314. INSERT INTO `xxl_job_lock` VALUES ('schedule_lock');
  315. COMMIT;
  316. -- ----------------------------
  317. -- Table structure for xxl_job_log
  318. -- ----------------------------
  319. DROP TABLE IF EXISTS `xxl_job_log`;
  320. CREATE TABLE `xxl_job_log` (
  321. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  322. `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
  323. `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
  324. `executor_address` varchar(255) DEFAULT NULL COMMENT '执行器地址,本次执行的地址',
  325. `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
  326. `executor_param` varchar(512) DEFAULT NULL COMMENT '执行器任务参数',
  327. `executor_sharding_param` varchar(20) DEFAULT NULL COMMENT '执行器任务分片参数,格式如 1/2',
  328. `executor_fail_retry_count` int(11) NOT NULL DEFAULT '0' COMMENT '失败重试次数',
  329. `trigger_time` datetime DEFAULT NULL COMMENT '调度-时间',
  330. `trigger_code` int(11) NOT NULL COMMENT '调度-结果',
  331. `trigger_msg` text COMMENT '调度-日志',
  332. `handle_time` datetime DEFAULT NULL COMMENT '执行-时间',
  333. `handle_code` int(11) NOT NULL COMMENT '执行-状态',
  334. `handle_msg` text COMMENT '执行-日志',
  335. `alarm_status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '告警状态:0-默认、1-无需告警、2-告警成功、3-告警失败',
  336. PRIMARY KEY (`id`),
  337. KEY `I_trigger_time` (`trigger_time`),
  338. KEY `I_handle_code` (`handle_code`)
  339. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
  340. -- ----------------------------
  341. -- Table structure for xxl_job_log_report
  342. -- ----------------------------
  343. DROP TABLE IF EXISTS `xxl_job_log_report`;
  344. CREATE TABLE `xxl_job_log_report` (
  345. `id` int(11) NOT NULL AUTO_INCREMENT,
  346. `trigger_day` datetime DEFAULT NULL COMMENT '调度-时间',
  347. `running_count` int(11) NOT NULL DEFAULT '0' COMMENT '运行中-日志数量',
  348. `suc_count` int(11) NOT NULL DEFAULT '0' COMMENT '执行成功-日志数量',
  349. `fail_count` int(11) NOT NULL DEFAULT '0' COMMENT '执行失败-日志数量',
  350. PRIMARY KEY (`id`),
  351. UNIQUE KEY `i_trigger_day` (`trigger_day`) USING BTREE
  352. ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
  353. -- ----------------------------
  354. -- Table structure for xxl_job_logglue
  355. -- ----------------------------
  356. DROP TABLE IF EXISTS `xxl_job_logglue`;
  357. CREATE TABLE `xxl_job_logglue` (
  358. `id` int(11) NOT NULL AUTO_INCREMENT,
  359. `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
  360. `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
  361. `glue_source` mediumtext COMMENT 'GLUE源代码',
  362. `glue_remark` varchar(128) NOT NULL COMMENT 'GLUE备注',
  363. `add_time` datetime DEFAULT NULL,
  364. `update_time` datetime DEFAULT NULL,
  365. PRIMARY KEY (`id`)
  366. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
  367. -- ----------------------------
  368. -- Table structure for xxl_job_registry
  369. -- ----------------------------
  370. DROP TABLE IF EXISTS `xxl_job_registry`;
  371. CREATE TABLE `xxl_job_registry` (
  372. `id` int(11) NOT NULL AUTO_INCREMENT,
  373. `registry_group` varchar(50) NOT NULL,
  374. `registry_key` varchar(255) NOT NULL,
  375. `registry_value` varchar(255) NOT NULL,
  376. `update_time` datetime DEFAULT NULL,
  377. PRIMARY KEY (`id`),
  378. KEY `i_g_k_v` (`registry_group`,`registry_key`,`registry_value`)
  379. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
  380. -- ----------------------------
  381. -- Table structure for xxl_job_user
  382. -- ----------------------------
  383. DROP TABLE IF EXISTS `xxl_job_user`;
  384. CREATE TABLE `xxl_job_user` (
  385. `id` int(11) NOT NULL AUTO_INCREMENT,
  386. `username` varchar(50) NOT NULL COMMENT '账号',
  387. `password` varchar(50) NOT NULL COMMENT '密码',
  388. `role` tinyint(4) NOT NULL COMMENT '角色:0-普通用户、1-管理员',
  389. `permission` varchar(255) DEFAULT NULL COMMENT '权限:执行器ID列表,多个逗号分割',
  390. PRIMARY KEY (`id`),
  391. UNIQUE KEY `i_username` (`username`) USING BTREE
  392. ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
  393. -- ----------------------------
  394. -- Records of xxl_job_user
  395. -- ----------------------------
  396. BEGIN;
  397. INSERT INTO `xxl_job_user` VALUES (1, 'admin', 'e10adc3949ba59abbe56e057f20f883e', 1, NULL);
  398. COMMIT;
  399. SET FOREIGN_KEY_CHECKS = 1;