翼度科技»论坛 编程开发 mysql 查看内容

qrtz表初始化脚本_mysql

4

主题

4

帖子

12

积分

新手上路

Rank: 1

积分
12
  1. DROP TABLE IF EXISTS qrtz_blob_triggers;
  2. DROP TABLE IF EXISTS qrtz_calendars;
  3. DROP TABLE IF EXISTS qrtz_cron_triggers;
  4. DROP TABLE IF EXISTS qrtz_fired_triggers;
  5. DROP TABLE IF EXISTS qrtz_locks;
  6. DROP TABLE IF EXISTS qrtz_paused_trigger_grps;
  7. DROP TABLE IF EXISTS qrtz_scheduler_state;
  8. DROP TABLE IF EXISTS qrtz_simple_triggers;
  9. DROP TABLE IF EXISTS qrtz_simprop_triggers;
  10. DROP TABLE IF EXISTS qrtz_task_triggers;
  11. DROP TABLE IF EXISTS qrtz_triggers;
  12. DROP TABLE IF EXISTS qrtz_job_details;
  13. --
  14. -- Table structure for table `qrtz_job_details`
  15. --
  16. DROP TABLE IF EXISTS `qrtz_job_details`;
  17. CREATE TABLE `qrtz_job_details` (
  18.   `SCHED_NAME` varchar(120) COLLATE utf8_bin NOT NULL,
  19.   `JOB_NAME` varchar(200) COLLATE utf8_bin NOT NULL,
  20.   `JOB_GROUP` varchar(200) COLLATE utf8_bin NOT NULL,
  21.   `DESCRIPTION` varchar(250) COLLATE utf8_bin DEFAULT NULL,
  22.   `JOB_CLASS_NAME` varchar(250) COLLATE utf8_bin NOT NULL,
  23.   `IS_DURABLE` varchar(1) COLLATE utf8_bin NOT NULL,
  24.   `IS_NONCONCURRENT` varchar(1) COLLATE utf8_bin NOT NULL,
  25.   `IS_UPDATE_DATA` varchar(1) COLLATE utf8_bin NOT NULL,
  26.   `REQUESTS_RECOVERY` varchar(1) COLLATE utf8_bin NOT NULL,
  27.   `JOB_DATA` longblob,
  28.   PRIMARY KEY (`SCHED_NAME`,`JOB_NAME`,`JOB_GROUP`),
  29.   KEY `IDX_QRTZ_J_GRP` (`SCHED_NAME`,`JOB_GROUP`),
  30.   KEY `IDX_QRTZ_J_REQ_RECOVERY` (`SCHED_NAME`,`REQUESTS_RECOVERY`)
  31. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
  32. --
  33. -- Table structure for table `qrtz_triggers`
  34. --
  35. DROP TABLE IF EXISTS `qrtz_triggers`;
  36. CREATE TABLE `qrtz_triggers` (
  37.   `SCHED_NAME` varchar(120) COLLATE utf8_bin NOT NULL,
  38.   `TRIGGER_NAME` varchar(200) COLLATE utf8_bin NOT NULL,
  39.   `TRIGGER_GROUP` varchar(200) COLLATE utf8_bin NOT NULL,
  40.   `JOB_NAME` varchar(200) COLLATE utf8_bin NOT NULL,
  41.   `JOB_GROUP` varchar(200) COLLATE utf8_bin NOT NULL,
  42.   `DESCRIPTION` varchar(250) COLLATE utf8_bin DEFAULT NULL,
  43.   `NEXT_FIRE_TIME` decimal(13,0) DEFAULT NULL,
  44.   `PREV_FIRE_TIME` decimal(13,0) DEFAULT NULL,
  45.   `PRIORITY` decimal(13,0) DEFAULT NULL,
  46.   `TRIGGER_STATE` varchar(16) COLLATE utf8_bin NOT NULL,
  47.   `TRIGGER_TYPE` varchar(8) COLLATE utf8_bin NOT NULL,
  48.   `START_TIME` decimal(13,0) NOT NULL,
  49.   `END_TIME` decimal(13,0) DEFAULT NULL,
  50.   `CALENDAR_NAME` varchar(200) COLLATE utf8_bin DEFAULT NULL,
  51.   `MISFIRE_INSTR` decimal(2,0) DEFAULT NULL,
  52.   `JOB_DATA` longblob,
  53.   PRIMARY KEY (`SCHED_NAME`,`TRIGGER_NAME`,`TRIGGER_GROUP`),
  54.   KEY `IDX_QRTZ_T_C` (`SCHED_NAME`,`CALENDAR_NAME`),
  55.   KEY `IDX_QRTZ_T_G` (`SCHED_NAME`,`TRIGGER_GROUP`),
  56.   KEY `IDX_QRTZ_T_J` (`JOB_NAME`,`JOB_GROUP`,`SCHED_NAME`),
  57.   KEY `IDX_QRTZ_T_JG` (`SCHED_NAME`,`JOB_GROUP`),
  58.   KEY `IDX_QRTZ_T_NEXT_FIRE_TIME` (`NEXT_FIRE_TIME`,`SCHED_NAME`),
  59.   KEY `IDX_QRTZ_T_NFT_MISFIRE` (`SCHED_NAME`,`MISFIRE_INSTR`,`NEXT_FIRE_TIME`),
  60.   KEY `IDX_QRTZ_T_NFT_ST` (`NEXT_FIRE_TIME`,`TRIGGER_STATE`,`SCHED_NAME`),
  61.   KEY `IDX_QRTZ_T_NFT_ST_MISFIRE` (`NEXT_FIRE_TIME`,`TRIGGER_STATE`,`SCHED_NAME`,`MISFIRE_INSTR`),
  62.   KEY `IDX_QRTZ_T_NFT_ST_MISFIRE_GRP` (`TRIGGER_GROUP`,`TRIGGER_STATE`,`NEXT_FIRE_TIME`,`MISFIRE_INSTR`,`SCHED_NAME`),
  63.   KEY `IDX_QRTZ_T_N_G_STATE` (`TRIGGER_GROUP`,`TRIGGER_STATE`,`SCHED_NAME`),
  64.   KEY `IDX_QRTZ_T_N_STATE` (`TRIGGER_STATE`,`SCHED_NAME`,`TRIGGER_NAME`,`TRIGGER_GROUP`),
  65.   KEY `IDX_QRTZ_T_STATE` (`TRIGGER_STATE`,`SCHED_NAME`),
  66.   KEY `QRTZ_TRIGGER_TO_JOBS_FK` (`SCHED_NAME`,`JOB_NAME`,`JOB_GROUP`),
  67.   CONSTRAINT `QRTZ_TRIGGER_TO_JOBS_FK` FOREIGN KEY (`SCHED_NAME`, `JOB_NAME`, `JOB_GROUP`) REFERENCES `qrtz_job_details` (`SCHED_NAME`, `JOB_NAME`, `JOB_GROUP`)
  68. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
  69. --
  70. -- Table structure for table `qrtz_blob_triggers`
  71. --
  72. DROP TABLE IF EXISTS `qrtz_blob_triggers`;
  73. CREATE TABLE `qrtz_blob_triggers` (
  74.   `SCHED_NAME` varchar(120) COLLATE utf8_bin NOT NULL,
  75.   `TRIGGER_NAME` varchar(200) COLLATE utf8_bin NOT NULL,
  76.   `TRIGGER_GROUP` varchar(200) COLLATE utf8_bin NOT NULL,
  77.   `BLOB_DATA` longblob,
  78.   PRIMARY KEY (`SCHED_NAME`,`TRIGGER_NAME`,`TRIGGER_GROUP`),
  79.   CONSTRAINT `QRTZ_BLOB_TRIG_TO_TRIG_FK` FOREIGN KEY (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) REFERENCES `qrtz_triggers` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`)
  80. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
  81. --
  82. -- Table structure for table `qrtz_calendars`
  83. --
  84. DROP TABLE IF EXISTS `qrtz_calendars`;
  85. CREATE TABLE `qrtz_calendars` (
  86.   `SCHED_NAME` varchar(120) COLLATE utf8_bin NOT NULL,
  87.   `CALENDAR_NAME` varchar(200) COLLATE utf8_bin NOT NULL,
  88.   `CALENDAR` longblob NOT NULL,
  89.   PRIMARY KEY (`SCHED_NAME`,`CALENDAR_NAME`)
  90. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
  91. --
  92. -- Table structure for table `qrtz_cron_triggers`
  93. --
  94. DROP TABLE IF EXISTS `qrtz_cron_triggers`;
  95. CREATE TABLE `qrtz_cron_triggers` (
  96.   `SCHED_NAME` varchar(120) COLLATE utf8_bin NOT NULL,
  97.   `TRIGGER_NAME` varchar(200) COLLATE utf8_bin NOT NULL,
  98.   `TRIGGER_GROUP` varchar(200) COLLATE utf8_bin NOT NULL,
  99.   `CRON_EXPRESSION` varchar(120) COLLATE utf8_bin NOT NULL,
  100.   `TIME_ZONE_ID` varchar(80) COLLATE utf8_bin DEFAULT NULL,
  101.   PRIMARY KEY (`SCHED_NAME`,`TRIGGER_NAME`,`TRIGGER_GROUP`),
  102.   CONSTRAINT `QRTZ_CRON_TRIG_TO_TRIG_FK` FOREIGN KEY (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) REFERENCES `qrtz_triggers` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`)
  103. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
  104. --
  105. -- Table structure for table `qrtz_fired_triggers`
  106. --
  107. DROP TABLE IF EXISTS `qrtz_fired_triggers`;
  108. CREATE TABLE `qrtz_fired_triggers` (
  109.   `SCHED_NAME` varchar(120) COLLATE utf8_bin NOT NULL,
  110.   `ENTRY_ID` varchar(95) COLLATE utf8_bin NOT NULL,
  111.   `TRIGGER_NAME` varchar(200) COLLATE utf8_bin NOT NULL,
  112.   `TRIGGER_GROUP` varchar(200) COLLATE utf8_bin NOT NULL,
  113.   `INSTANCE_NAME` varchar(200) COLLATE utf8_bin NOT NULL,
  114.   `FIRED_TIME` decimal(13,0) NOT NULL,
  115.   `SCHED_TIME` decimal(13,0) NOT NULL,
  116.   `PRIORITY` decimal(13,0) NOT NULL,
  117.   `STATE` varchar(16) COLLATE utf8_bin NOT NULL,
  118.   `JOB_NAME` varchar(200) COLLATE utf8_bin DEFAULT NULL,
  119.   `JOB_GROUP` varchar(200) COLLATE utf8_bin DEFAULT NULL,
  120.   `IS_NONCONCURRENT` varchar(1) COLLATE utf8_bin DEFAULT NULL,
  121.   `REQUESTS_RECOVERY` varchar(1) COLLATE utf8_bin DEFAULT NULL,
  122.   PRIMARY KEY (`SCHED_NAME`,`ENTRY_ID`),
  123.   KEY `IDX_QRTZ_FT_INST_JOB_REQ_RCVRY` (`SCHED_NAME`,`INSTANCE_NAME`,`REQUESTS_RECOVERY`),
  124.   KEY `IDX_QRTZ_FT_JG` (`JOB_GROUP`,`SCHED_NAME`),
  125.   KEY `IDX_QRTZ_FT_J_G` (`SCHED_NAME`,`JOB_NAME`,`JOB_GROUP`),
  126.   KEY `IDX_QRTZ_FT_TG` (`SCHED_NAME`,`TRIGGER_GROUP`),
  127.   KEY `IDX_QRTZ_FT_TRIG_INST_NAME` (`SCHED_NAME`,`INSTANCE_NAME`),
  128.   KEY `IDX_QRTZ_FT_T_G` (`SCHED_NAME`,`TRIGGER_NAME`,`TRIGGER_GROUP`)
  129. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
  130. --
  131. -- Table structure for table `qrtz_locks`
  132. --
  133. DROP TABLE IF EXISTS `qrtz_locks`;
  134. CREATE TABLE `qrtz_locks` (
  135.   `SCHED_NAME` varchar(120) COLLATE utf8_bin NOT NULL,
  136.   `LOCK_NAME` varchar(40) COLLATE utf8_bin NOT NULL,
  137.   PRIMARY KEY (`SCHED_NAME`,`LOCK_NAME`)
  138. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
  139. --
  140. -- Table structure for table `qrtz_paused_trigger_grps`
  141. --
  142. DROP TABLE IF EXISTS `qrtz_paused_trigger_grps`;
  143. CREATE TABLE `qrtz_paused_trigger_grps` (
  144.   `SCHED_NAME` varchar(120) COLLATE utf8_bin NOT NULL,
  145.   `TRIGGER_GROUP` varchar(200) COLLATE utf8_bin NOT NULL,
  146.   PRIMARY KEY (`SCHED_NAME`,`TRIGGER_GROUP`)
  147. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
  148. --
  149. -- Table structure for table `qrtz_scheduler_state`
  150. --
  151. DROP TABLE IF EXISTS `qrtz_scheduler_state`;
  152. CREATE TABLE `qrtz_scheduler_state` (
  153.   `SCHED_NAME` varchar(120) COLLATE utf8_bin NOT NULL,
  154.   `INSTANCE_NAME` varchar(200) COLLATE utf8_bin NOT NULL,
  155.   `LAST_CHECKIN_TIME` decimal(13,0) NOT NULL,
  156.   `CHECKIN_INTERVAL` decimal(13,0) NOT NULL,
  157.   PRIMARY KEY (`SCHED_NAME`,`INSTANCE_NAME`)
  158. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
  159. --
  160. -- Table structure for table `qrtz_simple_triggers`
  161. --
  162. DROP TABLE IF EXISTS `qrtz_simple_triggers`;
  163. CREATE TABLE `qrtz_simple_triggers` (
  164.   `SCHED_NAME` varchar(120) COLLATE utf8_bin NOT NULL,
  165.   `TRIGGER_NAME` varchar(200) COLLATE utf8_bin NOT NULL,
  166.   `TRIGGER_GROUP` varchar(200) COLLATE utf8_bin NOT NULL,
  167.   `REPEAT_COUNT` decimal(7,0) NOT NULL,
  168.   `REPEAT_INTERVAL` decimal(12,0) NOT NULL,
  169.   `TIMES_TRIGGERED` decimal(10,0) NOT NULL,
  170.   PRIMARY KEY (`SCHED_NAME`,`TRIGGER_NAME`,`TRIGGER_GROUP`),
  171.   CONSTRAINT `QRTZ_SIMPLE_TRIG_TO_TRIG_FK` FOREIGN KEY (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) REFERENCES `qrtz_triggers` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`)
  172. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
  173. --
  174. -- Table structure for table `qrtz_simprop_triggers`
  175. --
  176. DROP TABLE IF EXISTS `qrtz_simprop_triggers`;
  177. CREATE TABLE `qrtz_simprop_triggers` (
  178.   `SCHED_NAME` varchar(120) COLLATE utf8_bin NOT NULL,
  179.   `TRIGGER_NAME` varchar(200) COLLATE utf8_bin NOT NULL,
  180.   `TRIGGER_GROUP` varchar(200) COLLATE utf8_bin NOT NULL,
  181.   `STR_PROP_1` text COLLATE utf8_bin,
  182.   `STR_PROP_2` text COLLATE utf8_bin,
  183.   `STR_PROP_3` text COLLATE utf8_bin,
  184.   `INT_PROP_1` decimal(10,0) DEFAULT NULL,
  185.   `INT_PROP_2` decimal(10,0) DEFAULT NULL,
  186.   `LONG_PROP_1` decimal(13,0) DEFAULT NULL,
  187.   `LONG_PROP_2` decimal(13,0) DEFAULT NULL,
  188.   `DEC_PROP_1` decimal(13,4) DEFAULT NULL,
  189.   `DEC_PROP_2` decimal(13,4) DEFAULT NULL,
  190.   `BOOL_PROP_1` varchar(1) COLLATE utf8_bin DEFAULT NULL,
  191.   `BOOL_PROP_2` varchar(1) COLLATE utf8_bin DEFAULT NULL,
  192.   PRIMARY KEY (`SCHED_NAME`,`TRIGGER_NAME`,`TRIGGER_GROUP`),
  193.   CONSTRAINT `QRTZ_SIMPROP_TRIG_TO_TRIG_FK` FOREIGN KEY (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) REFERENCES `qrtz_triggers` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`)
  194. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
复制代码
 

来源:https://www.cnblogs.com/chinazhou-wang/p/17311874.html
免责声明:由于采集信息均来自互联网,如果侵犯了您的权益,请联系我们【E-Mail:cb@itdo.tech】 我们会及时删除侵权内容,谢谢合作!

举报 回复 使用道具