tables_xxl_job.sql 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200
  1. CREATE TABLE XXL_JOB_QRTZ_JOB_DETAILS
  2. (
  3. SCHED_NAME VARCHAR(120) NOT NULL,
  4. JOB_NAME VARCHAR(200) NOT NULL,
  5. JOB_GROUP VARCHAR(200) NOT NULL,
  6. DESCRIPTION VARCHAR(250) NULL,
  7. JOB_CLASS_NAME VARCHAR(250) NOT NULL,
  8. IS_DURABLE VARCHAR(1) NOT NULL,
  9. IS_NONCONCURRENT VARCHAR(1) NOT NULL,
  10. IS_UPDATE_DATA VARCHAR(1) NOT NULL,
  11. REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
  12. JOB_DATA BLOB NULL,
  13. PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
  14. );
  15. CREATE TABLE XXL_JOB_QRTZ_TRIGGERS
  16. (
  17. SCHED_NAME VARCHAR(120) NOT NULL,
  18. TRIGGER_NAME VARCHAR(200) NOT NULL,
  19. TRIGGER_GROUP VARCHAR(200) NOT NULL,
  20. JOB_NAME VARCHAR(200) NOT NULL,
  21. JOB_GROUP VARCHAR(200) NOT NULL,
  22. DESCRIPTION VARCHAR(250) NULL,
  23. NEXT_FIRE_TIME BIGINT(13) NULL,
  24. PREV_FIRE_TIME BIGINT(13) NULL,
  25. PRIORITY INTEGER NULL,
  26. TRIGGER_STATE VARCHAR(16) NOT NULL,
  27. TRIGGER_TYPE VARCHAR(8) NOT NULL,
  28. START_TIME BIGINT(13) NOT NULL,
  29. END_TIME BIGINT(13) NULL,
  30. CALENDAR_NAME VARCHAR(200) NULL,
  31. MISFIRE_INSTR SMALLINT(2) NULL,
  32. JOB_DATA BLOB NULL,
  33. PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
  34. FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
  35. REFERENCES XXL_JOB_QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
  36. );
  37. CREATE TABLE XXL_JOB_QRTZ_SIMPLE_TRIGGERS
  38. (
  39. SCHED_NAME VARCHAR(120) NOT NULL,
  40. TRIGGER_NAME VARCHAR(200) NOT NULL,
  41. TRIGGER_GROUP VARCHAR(200) NOT NULL,
  42. REPEAT_COUNT BIGINT(7) NOT NULL,
  43. REPEAT_INTERVAL BIGINT(12) NOT NULL,
  44. TIMES_TRIGGERED BIGINT(10) NOT NULL,
  45. PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
  46. FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
  47. REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
  48. );
  49. CREATE TABLE XXL_JOB_QRTZ_CRON_TRIGGERS
  50. (
  51. SCHED_NAME VARCHAR(120) NOT NULL,
  52. TRIGGER_NAME VARCHAR(200) NOT NULL,
  53. TRIGGER_GROUP VARCHAR(200) NOT NULL,
  54. CRON_EXPRESSION VARCHAR(200) NOT NULL,
  55. TIME_ZONE_ID VARCHAR(80),
  56. PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
  57. FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
  58. REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
  59. );
  60. CREATE TABLE XXL_JOB_QRTZ_SIMPROP_TRIGGERS
  61. (
  62. SCHED_NAME VARCHAR(120) NOT NULL,
  63. TRIGGER_NAME VARCHAR(200) NOT NULL,
  64. TRIGGER_GROUP VARCHAR(200) NOT NULL,
  65. STR_PROP_1 VARCHAR(512) NULL,
  66. STR_PROP_2 VARCHAR(512) NULL,
  67. STR_PROP_3 VARCHAR(512) NULL,
  68. INT_PROP_1 INT NULL,
  69. INT_PROP_2 INT NULL,
  70. LONG_PROP_1 BIGINT NULL,
  71. LONG_PROP_2 BIGINT NULL,
  72. DEC_PROP_1 NUMERIC(13,4) NULL,
  73. DEC_PROP_2 NUMERIC(13,4) NULL,
  74. BOOL_PROP_1 VARCHAR(1) NULL,
  75. BOOL_PROP_2 VARCHAR(1) NULL,
  76. PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
  77. FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
  78. REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
  79. );
  80. CREATE TABLE XXL_JOB_QRTZ_BLOB_TRIGGERS
  81. (
  82. SCHED_NAME VARCHAR(120) NOT NULL,
  83. TRIGGER_NAME VARCHAR(200) NOT NULL,
  84. TRIGGER_GROUP VARCHAR(200) NOT NULL,
  85. BLOB_DATA BLOB NULL,
  86. PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
  87. FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
  88. REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
  89. );
  90. CREATE TABLE XXL_JOB_QRTZ_CALENDARS
  91. (
  92. SCHED_NAME VARCHAR(120) NOT NULL,
  93. CALENDAR_NAME VARCHAR(200) NOT NULL,
  94. CALENDAR BLOB NOT NULL,
  95. PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
  96. );
  97. CREATE TABLE XXL_JOB_QRTZ_PAUSED_TRIGGER_GRPS
  98. (
  99. SCHED_NAME VARCHAR(120) NOT NULL,
  100. TRIGGER_GROUP VARCHAR(200) NOT NULL,
  101. PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
  102. );
  103. CREATE TABLE XXL_JOB_QRTZ_FIRED_TRIGGERS
  104. (
  105. SCHED_NAME VARCHAR(120) NOT NULL,
  106. ENTRY_ID VARCHAR(95) NOT NULL,
  107. TRIGGER_NAME VARCHAR(200) NOT NULL,
  108. TRIGGER_GROUP VARCHAR(200) NOT NULL,
  109. INSTANCE_NAME VARCHAR(200) NOT NULL,
  110. FIRED_TIME BIGINT(13) NOT NULL,
  111. SCHED_TIME BIGINT(13) NOT NULL,
  112. PRIORITY INTEGER NOT NULL,
  113. STATE VARCHAR(16) NOT NULL,
  114. JOB_NAME VARCHAR(200) NULL,
  115. JOB_GROUP VARCHAR(200) NULL,
  116. IS_NONCONCURRENT VARCHAR(1) NULL,
  117. REQUESTS_RECOVERY VARCHAR(1) NULL,
  118. PRIMARY KEY (SCHED_NAME,ENTRY_ID)
  119. );
  120. CREATE TABLE XXL_JOB_QRTZ_SCHEDULER_STATE
  121. (
  122. SCHED_NAME VARCHAR(120) NOT NULL,
  123. INSTANCE_NAME VARCHAR(200) NOT NULL,
  124. LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
  125. CHECKIN_INTERVAL BIGINT(13) NOT NULL,
  126. PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
  127. );
  128. CREATE TABLE XXL_JOB_QRTZ_LOCKS
  129. (
  130. SCHED_NAME VARCHAR(120) NOT NULL,
  131. LOCK_NAME VARCHAR(40) NOT NULL,
  132. PRIMARY KEY (SCHED_NAME,LOCK_NAME)
  133. );
  134. CREATE TABLE `xxl_job_qrtz_trigger_info` (
  135. `id` int(11) NOT NULL AUTO_INCREMENT,
  136. `job_group` varchar(255) NOT NULL COMMENT '任务组',
  137. `job_name` varchar(255) NOT NULL COMMENT '任务名',
  138. `job_cron` varchar(128) NOT NULL COMMENT '任务执行CRON',
  139. `job_desc` varchar(255) NOT NULL,
  140. `job_class` varchar(255) NOT NULL COMMENT '任务执行JobBean',
  141. `add_time` datetime DEFAULT NULL,
  142. `update_time` datetime DEFAULT NULL,
  143. `author` varchar(64) DEFAULT NULL COMMENT '作者',
  144. `alarm_email` varchar(255) DEFAULT NULL COMMENT '报警邮件',
  145. `alarm_threshold` int(11) DEFAULT NULL COMMENT '报警阀值(连续失败次数)',
  146. `executor_address` varchar(255) DEFAULT NULL COMMENT '执行器地址,有多个则逗号分隔',
  147. `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
  148. `executor_param` varchar(255) DEFAULT NULL COMMENT '执行器任务参数',
  149. `glue_switch` int(11) DEFAULT '0' COMMENT 'GLUE模式开关:0-否,1-是',
  150. `glue_source` text COMMENT 'GLUE源代码',
  151. `glue_remark` varchar(128) DEFAULT NULL COMMENT 'GLUE备注',
  152. PRIMARY KEY (`id`)
  153. ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
  154. CREATE TABLE `xxl_job_qrtz_trigger_log` (
  155. `id` int(11) NOT NULL AUTO_INCREMENT,
  156. `job_group` varchar(255) NOT NULL COMMENT '任务组',
  157. `job_name` varchar(255) NOT NULL COMMENT '任务名',
  158. `job_cron` varchar(128) NOT NULL COMMENT '任务执行CRON表达式',
  159. `job_desc` varchar(255) NOT NULL,
  160. `job_class` varchar(255) NOT NULL COMMENT '任务执行JobBean',
  161. `executor_address` varchar(255) DEFAULT NULL COMMENT '执行器地址,本次执行的地址',
  162. `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
  163. `executor_param` varchar(255) DEFAULT NULL COMMENT 'executor_param',
  164. `trigger_time` datetime DEFAULT NULL COMMENT '调度-时间',
  165. `trigger_status` varchar(255) DEFAULT NULL COMMENT '调度-结果',
  166. `trigger_msg` varchar(2048) DEFAULT NULL COMMENT '调度-日志',
  167. `handle_time` datetime DEFAULT NULL COMMENT '执行-时间',
  168. `handle_status` varchar(255) DEFAULT NULL COMMENT '执行-状态',
  169. `handle_msg` varchar(2048) DEFAULT NULL COMMENT '执行-日志',
  170. PRIMARY KEY (`id`)
  171. ) ENGINE=InnoDB AUTO_INCREMENT=33 DEFAULT CHARSET=utf8;
  172. CREATE TABLE `xxl_job_qrtz_trigger_logglue` (
  173. `id` int(11) NOT NULL AUTO_INCREMENT,
  174. `job_group` varchar(255) NOT NULL,
  175. `job_name` varchar(255) NOT NULL,
  176. `glue_source` text,
  177. `glue_remark` varchar(128) NOT NULL,
  178. `add_time` timestamp NULL DEFAULT NULL,
  179. `update_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
  180. PRIMARY KEY (`id`)
  181. ) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;
  182. commit;