dp-quartz.sql 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224
  1. /*
  2. Navicat MySQL Data Transfer
  3. Source Server : mysql192.168.180.134
  4. Source Server Version : 50548
  5. Source Host : 192.168.180.134:3306
  6. Source Database : dp-lte
  7. Target Server Type : MYSQL
  8. Target Server Version : 50548
  9. File Encoding : 65001
  10. Date: 2017-08-28 16:29:49
  11. */
  12. SET FOREIGN_KEY_CHECKS=0;
  13. -- ----------------------------
  14. -- Table structure for quartz_job
  15. -- ----------------------------
  16. DROP TABLE IF EXISTS `quartz_job`;
  17. CREATE TABLE `quartz_job` (
  18. `job_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '任务id',
  19. `bean_name` varchar(200) DEFAULT NULL COMMENT 'Spring Bean名称',
  20. `method_name` varchar(100) DEFAULT NULL COMMENT '方法名',
  21. `params` varchar(2000) DEFAULT NULL COMMENT '参数',
  22. `cron_expression` varchar(100) DEFAULT NULL COMMENT 'cron表达式',
  23. `status` tinyint(4) DEFAULT NULL COMMENT '任务状态,0:暂停,1:正常',
  24. `remark` varchar(255) DEFAULT NULL COMMENT '备注',
  25. `gmt_create` datetime DEFAULT NULL COMMENT '创建时间',
  26. `gmt_modified` datetime DEFAULT NULL COMMENT '修改时间',
  27. PRIMARY KEY (`job_id`)
  28. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='定时任务';
  29. -- ----------------------------
  30. -- Table structure for quartz_job_log
  31. -- ----------------------------
  32. DROP TABLE IF EXISTS `quartz_job_log`;
  33. CREATE TABLE `quartz_job_log` (
  34. `log_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '任务日志id',
  35. `job_id` bigint(20) NOT NULL COMMENT '任务id',
  36. `bean_name` varchar(200) DEFAULT NULL COMMENT 'spring bean名称',
  37. `method_name` varchar(100) DEFAULT NULL COMMENT '方法名',
  38. `params` varchar(2000) DEFAULT NULL COMMENT '参数',
  39. `status` tinyint(4) NOT NULL COMMENT '任务状态 0:失败 1:成功',
  40. `error` varchar(2000) DEFAULT NULL COMMENT '失败信息',
  41. `times` int(11) NOT NULL COMMENT '耗时(单位:毫秒)',
  42. `gmt_create` datetime DEFAULT NULL COMMENT '创建时间',
  43. PRIMARY KEY (`log_id`),
  44. KEY `job_id` (`job_id`) USING BTREE
  45. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='定时任务日志';
  46. DROP TABLE IF EXISTS QRTZ_FIRED_TRIGGERS;
  47. DROP TABLE IF EXISTS QRTZ_PAUSED_TRIGGER_GRPS;
  48. DROP TABLE IF EXISTS QRTZ_SCHEDULER_STATE;
  49. DROP TABLE IF EXISTS QRTZ_LOCKS;
  50. DROP TABLE IF EXISTS QRTZ_SIMPLE_TRIGGERS;
  51. DROP TABLE IF EXISTS QRTZ_SIMPROP_TRIGGERS;
  52. DROP TABLE IF EXISTS QRTZ_CRON_TRIGGERS;
  53. DROP TABLE IF EXISTS QRTZ_BLOB_TRIGGERS;
  54. DROP TABLE IF EXISTS QRTZ_TRIGGERS;
  55. DROP TABLE IF EXISTS QRTZ_JOB_DETAILS;
  56. DROP TABLE IF EXISTS QRTZ_CALENDARS;
  57. -- ----------------------------
  58. -- Table structure for quartz
  59. -- ----------------------------
  60. CREATE TABLE QRTZ_JOB_DETAILS(
  61. SCHED_NAME VARCHAR(120) NOT NULL,
  62. JOB_NAME VARCHAR(200) NOT NULL,
  63. JOB_GROUP VARCHAR(200) NOT NULL,
  64. DESCRIPTION VARCHAR(250) NULL,
  65. JOB_CLASS_NAME VARCHAR(250) NOT NULL,
  66. IS_DURABLE VARCHAR(1) NOT NULL,
  67. IS_NONCONCURRENT VARCHAR(1) NOT NULL,
  68. IS_UPDATE_DATA VARCHAR(1) NOT NULL,
  69. REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
  70. JOB_DATA BLOB NULL,
  71. PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP))
  72. ENGINE=InnoDB DEFAULT CHARSET=utf8;
  73. CREATE TABLE QRTZ_TRIGGERS (
  74. SCHED_NAME VARCHAR(120) NOT NULL,
  75. TRIGGER_NAME VARCHAR(200) NOT NULL,
  76. TRIGGER_GROUP VARCHAR(200) NOT NULL,
  77. JOB_NAME VARCHAR(200) NOT NULL,
  78. JOB_GROUP VARCHAR(200) NOT NULL,
  79. DESCRIPTION VARCHAR(250) NULL,
  80. NEXT_FIRE_TIME BIGINT(13) NULL,
  81. PREV_FIRE_TIME BIGINT(13) NULL,
  82. PRIORITY INTEGER NULL,
  83. TRIGGER_STATE VARCHAR(16) NOT NULL,
  84. TRIGGER_TYPE VARCHAR(8) NOT NULL,
  85. START_TIME BIGINT(13) NOT NULL,
  86. END_TIME BIGINT(13) NULL,
  87. CALENDAR_NAME VARCHAR(200) NULL,
  88. MISFIRE_INSTR SMALLINT(2) NULL,
  89. JOB_DATA BLOB NULL,
  90. PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
  91. FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
  92. REFERENCES QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP))
  93. ENGINE=InnoDB DEFAULT CHARSET=utf8;
  94. CREATE TABLE QRTZ_SIMPLE_TRIGGERS (
  95. SCHED_NAME VARCHAR(120) NOT NULL,
  96. TRIGGER_NAME VARCHAR(200) NOT NULL,
  97. TRIGGER_GROUP VARCHAR(200) NOT NULL,
  98. REPEAT_COUNT BIGINT(7) NOT NULL,
  99. REPEAT_INTERVAL BIGINT(12) NOT NULL,
  100. TIMES_TRIGGERED BIGINT(10) NOT NULL,
  101. PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
  102. FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
  103. REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP))
  104. ENGINE=InnoDB DEFAULT CHARSET=utf8;
  105. CREATE TABLE QRTZ_CRON_TRIGGERS (
  106. SCHED_NAME VARCHAR(120) NOT NULL,
  107. TRIGGER_NAME VARCHAR(200) NOT NULL,
  108. TRIGGER_GROUP VARCHAR(200) NOT NULL,
  109. CRON_EXPRESSION VARCHAR(120) NOT NULL,
  110. TIME_ZONE_ID VARCHAR(80),
  111. PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
  112. FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
  113. REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP))
  114. ENGINE=InnoDB DEFAULT CHARSET=utf8;
  115. CREATE TABLE QRTZ_SIMPROP_TRIGGERS
  116. (
  117. SCHED_NAME VARCHAR(120) NOT NULL,
  118. TRIGGER_NAME VARCHAR(200) NOT NULL,
  119. TRIGGER_GROUP VARCHAR(200) NOT NULL,
  120. STR_PROP_1 VARCHAR(512) NULL,
  121. STR_PROP_2 VARCHAR(512) NULL,
  122. STR_PROP_3 VARCHAR(512) NULL,
  123. INT_PROP_1 INT NULL,
  124. INT_PROP_2 INT NULL,
  125. LONG_PROP_1 BIGINT NULL,
  126. LONG_PROP_2 BIGINT NULL,
  127. DEC_PROP_1 NUMERIC(13,4) NULL,
  128. DEC_PROP_2 NUMERIC(13,4) NULL,
  129. BOOL_PROP_1 VARCHAR(1) NULL,
  130. BOOL_PROP_2 VARCHAR(1) NULL,
  131. PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
  132. FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
  133. REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP))
  134. ENGINE=InnoDB DEFAULT CHARSET=utf8;
  135. CREATE TABLE QRTZ_BLOB_TRIGGERS (
  136. SCHED_NAME VARCHAR(120) NOT NULL,
  137. TRIGGER_NAME VARCHAR(200) NOT NULL,
  138. TRIGGER_GROUP VARCHAR(200) NOT NULL,
  139. BLOB_DATA BLOB NULL,
  140. PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
  141. INDEX (SCHED_NAME,TRIGGER_NAME, TRIGGER_GROUP),
  142. FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
  143. REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP))
  144. ENGINE=InnoDB DEFAULT CHARSET=utf8;
  145. CREATE TABLE QRTZ_CALENDARS (
  146. SCHED_NAME VARCHAR(120) NOT NULL,
  147. CALENDAR_NAME VARCHAR(200) NOT NULL,
  148. CALENDAR BLOB NOT NULL,
  149. PRIMARY KEY (SCHED_NAME,CALENDAR_NAME))
  150. ENGINE=InnoDB DEFAULT CHARSET=utf8;
  151. CREATE TABLE QRTZ_PAUSED_TRIGGER_GRPS (
  152. SCHED_NAME VARCHAR(120) NOT NULL,
  153. TRIGGER_GROUP VARCHAR(200) NOT NULL,
  154. PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP))
  155. ENGINE=InnoDB DEFAULT CHARSET=utf8;
  156. CREATE TABLE QRTZ_FIRED_TRIGGERS (
  157. SCHED_NAME VARCHAR(120) NOT NULL,
  158. ENTRY_ID VARCHAR(95) NOT NULL,
  159. TRIGGER_NAME VARCHAR(200) NOT NULL,
  160. TRIGGER_GROUP VARCHAR(200) NOT NULL,
  161. INSTANCE_NAME VARCHAR(200) NOT NULL,
  162. FIRED_TIME BIGINT(13) NOT NULL,
  163. SCHED_TIME BIGINT(13) NOT NULL,
  164. PRIORITY INTEGER NOT NULL,
  165. STATE VARCHAR(16) NOT NULL,
  166. JOB_NAME VARCHAR(200) NULL,
  167. JOB_GROUP VARCHAR(200) NULL,
  168. IS_NONCONCURRENT VARCHAR(1) NULL,
  169. REQUESTS_RECOVERY VARCHAR(1) NULL,
  170. PRIMARY KEY (SCHED_NAME,ENTRY_ID))
  171. ENGINE=InnoDB DEFAULT CHARSET=utf8;
  172. CREATE TABLE QRTZ_SCHEDULER_STATE (
  173. SCHED_NAME VARCHAR(120) NOT NULL,
  174. INSTANCE_NAME VARCHAR(200) NOT NULL,
  175. LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
  176. CHECKIN_INTERVAL BIGINT(13) NOT NULL,
  177. PRIMARY KEY (SCHED_NAME,INSTANCE_NAME))
  178. ENGINE=InnoDB DEFAULT CHARSET=utf8;
  179. CREATE TABLE QRTZ_LOCKS (
  180. SCHED_NAME VARCHAR(120) NOT NULL,
  181. LOCK_NAME VARCHAR(40) NOT NULL,
  182. PRIMARY KEY (SCHED_NAME,LOCK_NAME))
  183. ENGINE=InnoDB DEFAULT CHARSET=utf8;
  184. CREATE INDEX IDX_QRTZ_J_REQ_RECOVERY ON QRTZ_JOB_DETAILS(SCHED_NAME,REQUESTS_RECOVERY);
  185. CREATE INDEX IDX_QRTZ_J_GRP ON QRTZ_JOB_DETAILS(SCHED_NAME,JOB_GROUP);
  186. CREATE INDEX IDX_QRTZ_T_J ON QRTZ_TRIGGERS(SCHED_NAME,JOB_NAME,JOB_GROUP);
  187. CREATE INDEX IDX_QRTZ_T_JG ON QRTZ_TRIGGERS(SCHED_NAME,JOB_GROUP);
  188. CREATE INDEX IDX_QRTZ_T_C ON QRTZ_TRIGGERS(SCHED_NAME,CALENDAR_NAME);
  189. CREATE INDEX IDX_QRTZ_T_G ON QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_GROUP);
  190. CREATE INDEX IDX_QRTZ_T_STATE ON QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_STATE);
  191. CREATE INDEX IDX_QRTZ_T_N_STATE ON QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP,TRIGGER_STATE);
  192. CREATE INDEX IDX_QRTZ_T_N_G_STATE ON QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_GROUP,TRIGGER_STATE);
  193. CREATE INDEX IDX_QRTZ_T_NEXT_FIRE_TIME ON QRTZ_TRIGGERS(SCHED_NAME,NEXT_FIRE_TIME);
  194. CREATE INDEX IDX_QRTZ_T_NFT_ST ON QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_STATE,NEXT_FIRE_TIME);
  195. CREATE INDEX IDX_QRTZ_T_NFT_MISFIRE ON QRTZ_TRIGGERS(SCHED_NAME,MISFIRE_INSTR,NEXT_FIRE_TIME);
  196. CREATE INDEX IDX_QRTZ_T_NFT_ST_MISFIRE ON QRTZ_TRIGGERS(SCHED_NAME,MISFIRE_INSTR,NEXT_FIRE_TIME,TRIGGER_STATE);
  197. CREATE INDEX IDX_QRTZ_T_NFT_ST_MISFIRE_GRP ON QRTZ_TRIGGERS(SCHED_NAME,MISFIRE_INSTR,NEXT_FIRE_TIME,TRIGGER_GROUP,TRIGGER_STATE);
  198. CREATE INDEX IDX_QRTZ_FT_TRIG_INST_NAME ON QRTZ_FIRED_TRIGGERS(SCHED_NAME,INSTANCE_NAME);
  199. CREATE INDEX IDX_QRTZ_FT_INST_JOB_REQ_RCVRY ON QRTZ_FIRED_TRIGGERS(SCHED_NAME,INSTANCE_NAME,REQUESTS_RECOVERY);
  200. CREATE INDEX IDX_QRTZ_FT_J_G ON QRTZ_FIRED_TRIGGERS(SCHED_NAME,JOB_NAME,JOB_GROUP);
  201. CREATE INDEX IDX_QRTZ_FT_JG ON QRTZ_FIRED_TRIGGERS(SCHED_NAME,JOB_GROUP);
  202. CREATE INDEX IDX_QRTZ_FT_T_G ON QRTZ_FIRED_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP);
  203. CREATE INDEX IDX_QRTZ_FT_TG ON QRTZ_FIRED_TRIGGERS(SCHED_NAME,TRIGGER_GROUP);