mysql.sql 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444
  1. -- 菜单
  2. CREATE TABLE `sys_menu`
  3. (
  4. `menu_id` bigint NOT NULL AUTO_INCREMENT,
  5. `parent_id` bigint COMMENT '父菜单ID,一级菜单为0',
  6. `name` varchar(50) COMMENT '菜单名称',
  7. `url` varchar(200) COMMENT '菜单URL',
  8. `perms` varchar(500) COMMENT '授权(多个用逗号分隔,如:user:list,user:create)',
  9. `type` int COMMENT '类型 0:目录 1:菜单 2:按钮',
  10. `icon` varchar(50) COMMENT '菜单图标',
  11. `order_num` int COMMENT '排序',
  12. PRIMARY KEY (`menu_id`)
  13. ) ENGINE = `InnoDB`
  14. DEFAULT CHARACTER SET utf8mb4 COMMENT ='菜单管理';
  15. -- 系统用户
  16. CREATE TABLE `sys_user`
  17. (
  18. `user_id` bigint NOT NULL AUTO_INCREMENT,
  19. `username` varchar(50) NOT NULL COMMENT '用户名',
  20. `password` varchar(100) COMMENT '密码',
  21. `salt` varchar(20) COMMENT '盐',
  22. `email` varchar(100) COMMENT '邮箱',
  23. `mobile` varchar(100) COMMENT '手机号',
  24. `status` tinyint COMMENT '状态 0:禁用 1:正常',
  25. `create_user_id` bigint(20) COMMENT '创建者ID',
  26. `create_time` datetime COMMENT '创建时间',
  27. PRIMARY KEY (`user_id`),
  28. UNIQUE INDEX (`username`)
  29. ) ENGINE = `InnoDB`
  30. DEFAULT CHARACTER SET utf8mb4 COMMENT ='系统用户';
  31. -- 系统用户Token
  32. CREATE TABLE `sys_user_token`
  33. (
  34. `user_id` bigint(20) NOT NULL,
  35. `token` varchar(100) NOT NULL COMMENT 'token',
  36. `expire_time` datetime DEFAULT NULL COMMENT '过期时间',
  37. `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  38. PRIMARY KEY (`user_id`),
  39. UNIQUE KEY `token` (`token`)
  40. ) ENGINE = `InnoDB`
  41. DEFAULT CHARACTER SET utf8mb4 COMMENT ='系统用户Token';
  42. -- 系统验证码
  43. CREATE TABLE `sys_captcha`
  44. (
  45. `uuid` char(36) NOT NULL COMMENT 'uuid',
  46. `code` varchar(6) NOT NULL COMMENT '验证码',
  47. `expire_time` datetime DEFAULT NULL COMMENT '过期时间',
  48. PRIMARY KEY (`uuid`)
  49. ) ENGINE = `InnoDB`
  50. DEFAULT CHARACTER SET utf8mb4 COMMENT ='系统验证码';
  51. -- 角色
  52. CREATE TABLE `sys_role`
  53. (
  54. `role_id` bigint NOT NULL AUTO_INCREMENT,
  55. `role_name` varchar(100) COMMENT '角色名称',
  56. `remark` varchar(100) COMMENT '备注',
  57. `create_user_id` bigint(20) COMMENT '创建者ID',
  58. `create_time` datetime COMMENT '创建时间',
  59. PRIMARY KEY (`role_id`)
  60. ) ENGINE = `InnoDB`
  61. DEFAULT CHARACTER SET utf8mb4 COMMENT ='角色';
  62. -- 用户与角色对应关系
  63. CREATE TABLE `sys_user_role`
  64. (
  65. `id` bigint NOT NULL AUTO_INCREMENT,
  66. `user_id` bigint COMMENT '用户ID',
  67. `role_id` bigint COMMENT '角色ID',
  68. PRIMARY KEY (`id`)
  69. ) ENGINE = `InnoDB`
  70. DEFAULT CHARACTER SET utf8mb4 COMMENT ='用户与角色对应关系';
  71. -- 角色与菜单对应关系
  72. CREATE TABLE `sys_role_menu`
  73. (
  74. `id` bigint NOT NULL AUTO_INCREMENT,
  75. `role_id` bigint COMMENT '角色ID',
  76. `menu_id` bigint COMMENT '菜单ID',
  77. PRIMARY KEY (`id`)
  78. ) ENGINE = `InnoDB`
  79. DEFAULT CHARACTER SET utf8mb4 COMMENT ='角色与菜单对应关系';
  80. -- 系统配置信息
  81. CREATE TABLE `sys_config`
  82. (
  83. `id` bigint NOT NULL AUTO_INCREMENT,
  84. `param_key` varchar(50) COMMENT 'key',
  85. `param_value` varchar(2000) COMMENT 'value',
  86. `status` tinyint DEFAULT 1 COMMENT '状态 0:隐藏 1:显示',
  87. `remark` varchar(500) COMMENT '备注',
  88. PRIMARY KEY (`id`),
  89. UNIQUE INDEX (`param_key`)
  90. ) ENGINE = `InnoDB`
  91. DEFAULT CHARACTER SET utf8mb4 COMMENT ='系统配置信息表';
  92. -- 系统日志
  93. CREATE TABLE `sys_log`
  94. (
  95. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  96. `username` varchar(50) COMMENT '用户名',
  97. `operation` varchar(50) COMMENT '用户操作',
  98. `method` varchar(200) COMMENT '请求方法',
  99. `params` varchar(5000) COMMENT '请求参数',
  100. `time` bigint NOT NULL COMMENT '执行时长(毫秒)',
  101. `ip` varchar(64) COMMENT 'IP地址',
  102. `create_date` datetime COMMENT '创建时间',
  103. PRIMARY KEY (`id`)
  104. ) ENGINE = `InnoDB`
  105. DEFAULT CHARACTER SET utf8mb4 COMMENT ='系统日志';
  106. -- 文件上传
  107. CREATE TABLE `sys_oss`
  108. (
  109. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  110. `url` varchar(200) COMMENT 'URL地址',
  111. `create_date` datetime COMMENT '创建时间',
  112. PRIMARY KEY (`id`)
  113. ) ENGINE = `InnoDB`
  114. DEFAULT CHARACTER SET utf8mb4 COMMENT ='文件上传';
  115. -- 定时任务
  116. CREATE TABLE `schedule_job`
  117. (
  118. `job_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '任务id',
  119. `bean_name` varchar(200) DEFAULT NULL COMMENT 'spring bean名称',
  120. `params` varchar(2000) DEFAULT NULL COMMENT '参数',
  121. `cron_expression` varchar(100) DEFAULT NULL COMMENT 'cron表达式',
  122. `status` tinyint(4) DEFAULT NULL COMMENT '任务状态 0:正常 1:暂停',
  123. `remark` varchar(255) DEFAULT NULL COMMENT '备注',
  124. `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  125. PRIMARY KEY (`job_id`)
  126. ) ENGINE = `InnoDB`
  127. DEFAULT CHARACTER SET utf8mb4 COMMENT ='定时任务';
  128. -- 定时任务日志
  129. CREATE TABLE `schedule_job_log`
  130. (
  131. `log_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '任务日志id',
  132. `job_id` bigint(20) NOT NULL COMMENT '任务id',
  133. `bean_name` varchar(200) DEFAULT NULL COMMENT 'spring bean名称',
  134. `params` varchar(2000) DEFAULT NULL COMMENT '参数',
  135. `status` tinyint(4) NOT NULL COMMENT '任务状态 0:成功 1:失败',
  136. `error` varchar(2000) DEFAULT NULL COMMENT '失败信息',
  137. `times` int(11) NOT NULL COMMENT '耗时(单位:毫秒)',
  138. `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  139. PRIMARY KEY (`log_id`),
  140. KEY `job_id` (`job_id`)
  141. ) ENGINE = `InnoDB`
  142. DEFAULT CHARACTER SET utf8mb4 COMMENT ='定时任务日志';
  143. -- 用户表
  144. CREATE TABLE `tb_user`
  145. (
  146. `user_id` bigint NOT NULL AUTO_INCREMENT,
  147. `username` varchar(50) NOT NULL COMMENT '用户名',
  148. `mobile` varchar(20) NOT NULL COMMENT '手机号',
  149. `password` varchar(64) COMMENT '密码',
  150. `create_time` datetime COMMENT '创建时间',
  151. PRIMARY KEY (`user_id`),
  152. UNIQUE INDEX (`username`)
  153. ) ENGINE = `InnoDB`
  154. DEFAULT CHARACTER SET utf8mb4 COMMENT ='用户';
  155. -- 初始数据
  156. INSERT INTO `sys_user` (`user_id`, `username`, `password`, `salt`, `email`, `mobile`, `status`, `create_user_id`,
  157. `create_time`)
  158. VALUES ('1', 'admin', '9ec9750e709431dad22365cabc5c625482e574c74adaebba7dd02f1129e4ce1d', 'YzcmCZNvbXocrsz9dm8e',
  159. 'root@renren.io', '13612345678', '1', '1', '2016-11-11 11:11:11');
  160. INSERT INTO `sys_menu`(`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`)
  161. VALUES (1, 0, '系统管理', NULL, NULL, 0, 'system', 0);
  162. INSERT INTO `sys_menu`(`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`)
  163. VALUES (2, 1, '管理员列表', 'sys/user', NULL, 1, 'admin', 1);
  164. INSERT INTO `sys_menu`(`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`)
  165. VALUES (3, 1, '角色管理', 'sys/role', NULL, 1, 'role', 2);
  166. INSERT INTO `sys_menu`(`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`)
  167. VALUES (4, 1, '菜单管理', 'sys/menu', NULL, 1, 'menu', 3);
  168. INSERT INTO `sys_menu`(`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`)
  169. # VALUES (5, 1, 'SQL监控', 'http://localhost:8080/renren-fast/druid/sql.html', NULL, 1, 'sql', 4);
  170. VALUES (5, 1, 'SQL监控', 'http://localhost:8080/mkcloud/druid/sql.html', NULL, 1, 'sql', 4);
  171. INSERT INTO `sys_menu`(`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`)
  172. VALUES (6, 1, '定时任务', 'job/schedule', NULL, 1, 'job', 5);
  173. INSERT INTO `sys_menu`(`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`)
  174. VALUES (7, 6, '查看', NULL, 'sys:schedule:list,sys:schedule:info', 2, NULL, 0);
  175. INSERT INTO `sys_menu`(`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`)
  176. VALUES (8, 6, '新增', NULL, 'sys:schedule:save', 2, NULL, 0);
  177. INSERT INTO `sys_menu`(`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`)
  178. VALUES (9, 6, '修改', NULL, 'sys:schedule:update', 2, NULL, 0);
  179. INSERT INTO `sys_menu`(`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`)
  180. VALUES (10, 6, '删除', NULL, 'sys:schedule:delete', 2, NULL, 0);
  181. INSERT INTO `sys_menu`(`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`)
  182. VALUES (11, 6, '暂停', NULL, 'sys:schedule:pause', 2, NULL, 0);
  183. INSERT INTO `sys_menu`(`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`)
  184. VALUES (12, 6, '恢复', NULL, 'sys:schedule:resume', 2, NULL, 0);
  185. INSERT INTO `sys_menu`(`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`)
  186. VALUES (13, 6, '立即执行', NULL, 'sys:schedule:run', 2, NULL, 0);
  187. INSERT INTO `sys_menu`(`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`)
  188. VALUES (14, 6, '日志列表', NULL, 'sys:schedule:log', 2, NULL, 0);
  189. INSERT INTO `sys_menu`(`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`)
  190. VALUES (15, 2, '查看', NULL, 'sys:user:list,sys:user:info', 2, NULL, 0);
  191. INSERT INTO `sys_menu`(`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`)
  192. VALUES (16, 2, '新增', NULL, 'sys:user:save,sys:role:select', 2, NULL, 0);
  193. INSERT INTO `sys_menu`(`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`)
  194. VALUES (17, 2, '修改', NULL, 'sys:user:update,sys:role:select', 2, NULL, 0);
  195. INSERT INTO `sys_menu`(`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`)
  196. VALUES (18, 2, '删除', NULL, 'sys:user:delete', 2, NULL, 0);
  197. INSERT INTO `sys_menu`(`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`)
  198. VALUES (19, 3, '查看', NULL, 'sys:role:list,sys:role:info', 2, NULL, 0);
  199. INSERT INTO `sys_menu`(`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`)
  200. VALUES (20, 3, '新增', NULL, 'sys:role:save,sys:menu:list', 2, NULL, 0);
  201. INSERT INTO `sys_menu`(`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`)
  202. VALUES (21, 3, '修改', NULL, 'sys:role:update,sys:menu:list', 2, NULL, 0);
  203. INSERT INTO `sys_menu`(`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`)
  204. VALUES (22, 3, '删除', NULL, 'sys:role:delete', 2, NULL, 0);
  205. INSERT INTO `sys_menu`(`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`)
  206. VALUES (23, 4, '查看', NULL, 'sys:menu:list,sys:menu:info', 2, NULL, 0);
  207. INSERT INTO `sys_menu`(`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`)
  208. VALUES (24, 4, '新增', NULL, 'sys:menu:save,sys:menu:select', 2, NULL, 0);
  209. INSERT INTO `sys_menu`(`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`)
  210. VALUES (25, 4, '修改', NULL, 'sys:menu:update,sys:menu:select', 2, NULL, 0);
  211. INSERT INTO `sys_menu`(`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`)
  212. VALUES (26, 4, '删除', NULL, 'sys:menu:delete', 2, NULL, 0);
  213. INSERT INTO `sys_menu`(`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`)
  214. VALUES (27, 1, '参数管理', 'sys/config',
  215. 'sys:config:list,sys:config:info,sys:config:save,sys:config:update,sys:config:delete', 1, 'config', 6);
  216. INSERT INTO `sys_menu`(`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`)
  217. VALUES (29, 1, '系统日志', 'sys/log', 'sys:log:list', 1, 'log', 7);
  218. INSERT INTO `sys_menu`(`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`)
  219. VALUES (30, 1, '文件上传', 'oss/oss', 'sys:oss:all', 1, 'oss', 6);
  220. INSERT INTO `sys_config` (`param_key`, `param_value`, `status`, `remark`)
  221. VALUES ('CLOUD_STORAGE_CONFIG_KEY',
  222. '{\"aliyunAccessKeyId\":\"\",\"aliyunAccessKeySecret\":\"\",\"aliyunBucketName\":\"\",\"aliyunDomain\":\"\",\"aliyunEndPoint\":\"\",\"aliyunPrefix\":\"\",\"qcloudBucketName\":\"\",\"qcloudDomain\":\"\",\"qcloudPrefix\":\"\",\"qcloudSecretId\":\"\",\"qcloudSecretKey\":\"\",\"qiniuAccessKey\":\"NrgMfABZxWLo5B-YYSjoE8-AZ1EISdi1Z3ubLOeZ\",\"qiniuBucketName\":\"ios-app\",\"qiniuDomain\":\"http://7xqbwh.dl1.z0.glb.clouddn.com\",\"qiniuPrefix\":\"upload\",\"qiniuSecretKey\":\"uIwJHevMRWU0VLxFvgy0tAcOdGqasdtVlJkdy6vV\",\"type\":1}',
  223. '0', '云存储配置信息');
  224. INSERT INTO `schedule_job` (`bean_name`, `params`, `cron_expression`, `status`, `remark`, `create_time`)
  225. VALUES ('testTask', 'renren', '0 0/30 * * * ?', '0', '参数测试', now());
  226. -- 账号:13612345678 密码:admin
  227. INSERT INTO `tb_user` (`username`, `mobile`, `password`, `create_time`)
  228. VALUES ('mark', '13612345678', '8c6976e5b5410415bde908bd4dee15dfb167a9c873fc4bb8a81f6f2ab448a918',
  229. '2017-03-23 22:37:41');
  230. -- quartz自带表结构
  231. CREATE TABLE QRTZ_JOB_DETAILS
  232. (
  233. SCHED_NAME VARCHAR(120) NOT NULL,
  234. JOB_NAME VARCHAR(200) NOT NULL,
  235. JOB_GROUP VARCHAR(200) NOT NULL,
  236. DESCRIPTION VARCHAR(250) NULL,
  237. JOB_CLASS_NAME VARCHAR(250) NOT NULL,
  238. IS_DURABLE VARCHAR(1) NOT NULL,
  239. IS_NONCONCURRENT VARCHAR(1) NOT NULL,
  240. IS_UPDATE_DATA VARCHAR(1) NOT NULL,
  241. REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
  242. JOB_DATA BLOB NULL,
  243. PRIMARY KEY (SCHED_NAME, JOB_NAME, JOB_GROUP)
  244. )
  245. ENGINE = InnoDB
  246. DEFAULT CHARSET = utf8;
  247. CREATE TABLE QRTZ_TRIGGERS
  248. (
  249. SCHED_NAME VARCHAR(120) NOT NULL,
  250. TRIGGER_NAME VARCHAR(200) NOT NULL,
  251. TRIGGER_GROUP VARCHAR(200) NOT NULL,
  252. JOB_NAME VARCHAR(200) NOT NULL,
  253. JOB_GROUP VARCHAR(200) NOT NULL,
  254. DESCRIPTION VARCHAR(250) NULL,
  255. NEXT_FIRE_TIME BIGINT(13) NULL,
  256. PREV_FIRE_TIME BIGINT(13) NULL,
  257. PRIORITY INTEGER NULL,
  258. TRIGGER_STATE VARCHAR(16) NOT NULL,
  259. TRIGGER_TYPE VARCHAR(8) NOT NULL,
  260. START_TIME BIGINT(13) NOT NULL,
  261. END_TIME BIGINT(13) NULL,
  262. CALENDAR_NAME VARCHAR(200) NULL,
  263. MISFIRE_INSTR SMALLINT(2) NULL,
  264. JOB_DATA BLOB NULL,
  265. PRIMARY KEY (SCHED_NAME, TRIGGER_NAME, TRIGGER_GROUP),
  266. FOREIGN KEY (SCHED_NAME, JOB_NAME, JOB_GROUP)
  267. REFERENCES QRTZ_JOB_DETAILS (SCHED_NAME, JOB_NAME, JOB_GROUP)
  268. )
  269. ENGINE = InnoDB
  270. DEFAULT CHARSET = utf8;
  271. CREATE TABLE QRTZ_SIMPLE_TRIGGERS
  272. (
  273. SCHED_NAME VARCHAR(120) NOT NULL,
  274. TRIGGER_NAME VARCHAR(200) NOT NULL,
  275. TRIGGER_GROUP VARCHAR(200) NOT NULL,
  276. REPEAT_COUNT BIGINT(7) NOT NULL,
  277. REPEAT_INTERVAL BIGINT(12) NOT NULL,
  278. TIMES_TRIGGERED BIGINT(10) NOT NULL,
  279. PRIMARY KEY (SCHED_NAME, TRIGGER_NAME, TRIGGER_GROUP),
  280. FOREIGN KEY (SCHED_NAME, TRIGGER_NAME, TRIGGER_GROUP)
  281. REFERENCES QRTZ_TRIGGERS (SCHED_NAME, TRIGGER_NAME, TRIGGER_GROUP)
  282. )
  283. ENGINE = InnoDB
  284. DEFAULT CHARSET = utf8;
  285. CREATE TABLE QRTZ_CRON_TRIGGERS
  286. (
  287. SCHED_NAME VARCHAR(120) NOT NULL,
  288. TRIGGER_NAME VARCHAR(200) NOT NULL,
  289. TRIGGER_GROUP VARCHAR(200) NOT NULL,
  290. CRON_EXPRESSION VARCHAR(120) NOT NULL,
  291. TIME_ZONE_ID VARCHAR(80),
  292. PRIMARY KEY (SCHED_NAME, TRIGGER_NAME, TRIGGER_GROUP),
  293. FOREIGN KEY (SCHED_NAME, TRIGGER_NAME, TRIGGER_GROUP)
  294. REFERENCES QRTZ_TRIGGERS (SCHED_NAME, TRIGGER_NAME, TRIGGER_GROUP)
  295. )
  296. ENGINE = InnoDB
  297. DEFAULT CHARSET = utf8;
  298. CREATE TABLE QRTZ_SIMPROP_TRIGGERS
  299. (
  300. SCHED_NAME VARCHAR(120) NOT NULL,
  301. TRIGGER_NAME VARCHAR(200) NOT NULL,
  302. TRIGGER_GROUP VARCHAR(200) NOT NULL,
  303. STR_PROP_1 VARCHAR(512) NULL,
  304. STR_PROP_2 VARCHAR(512) NULL,
  305. STR_PROP_3 VARCHAR(512) NULL,
  306. INT_PROP_1 INT NULL,
  307. INT_PROP_2 INT NULL,
  308. LONG_PROP_1 BIGINT NULL,
  309. LONG_PROP_2 BIGINT NULL,
  310. DEC_PROP_1 NUMERIC(13, 4) NULL,
  311. DEC_PROP_2 NUMERIC(13, 4) NULL,
  312. BOOL_PROP_1 VARCHAR(1) NULL,
  313. BOOL_PROP_2 VARCHAR(1) NULL,
  314. PRIMARY KEY (SCHED_NAME, TRIGGER_NAME, TRIGGER_GROUP),
  315. FOREIGN KEY (SCHED_NAME, TRIGGER_NAME, TRIGGER_GROUP)
  316. REFERENCES QRTZ_TRIGGERS (SCHED_NAME, TRIGGER_NAME, TRIGGER_GROUP)
  317. )
  318. ENGINE = InnoDB
  319. DEFAULT CHARSET = utf8;
  320. CREATE TABLE QRTZ_BLOB_TRIGGERS
  321. (
  322. SCHED_NAME VARCHAR(120) NOT NULL,
  323. TRIGGER_NAME VARCHAR(200) NOT NULL,
  324. TRIGGER_GROUP VARCHAR(200) NOT NULL,
  325. BLOB_DATA BLOB NULL,
  326. PRIMARY KEY (SCHED_NAME, TRIGGER_NAME, TRIGGER_GROUP),
  327. INDEX (SCHED_NAME, TRIGGER_NAME, TRIGGER_GROUP),
  328. FOREIGN KEY (SCHED_NAME, TRIGGER_NAME, TRIGGER_GROUP)
  329. REFERENCES QRTZ_TRIGGERS (SCHED_NAME, TRIGGER_NAME, TRIGGER_GROUP)
  330. )
  331. ENGINE = InnoDB
  332. DEFAULT CHARSET = utf8;
  333. CREATE TABLE QRTZ_CALENDARS
  334. (
  335. SCHED_NAME VARCHAR(120) NOT NULL,
  336. CALENDAR_NAME VARCHAR(200) NOT NULL,
  337. CALENDAR BLOB NOT NULL,
  338. PRIMARY KEY (SCHED_NAME, CALENDAR_NAME)
  339. )
  340. ENGINE = InnoDB
  341. DEFAULT CHARSET = utf8;
  342. CREATE TABLE QRTZ_PAUSED_TRIGGER_GRPS
  343. (
  344. SCHED_NAME VARCHAR(120) NOT NULL,
  345. TRIGGER_GROUP VARCHAR(200) NOT NULL,
  346. PRIMARY KEY (SCHED_NAME, TRIGGER_GROUP)
  347. )
  348. ENGINE = InnoDB
  349. DEFAULT CHARSET = utf8;
  350. CREATE TABLE QRTZ_FIRED_TRIGGERS
  351. (
  352. SCHED_NAME VARCHAR(120) NOT NULL,
  353. ENTRY_ID VARCHAR(95) NOT NULL,
  354. TRIGGER_NAME VARCHAR(200) NOT NULL,
  355. TRIGGER_GROUP VARCHAR(200) NOT NULL,
  356. INSTANCE_NAME VARCHAR(200) NOT NULL,
  357. FIRED_TIME BIGINT(13) NOT NULL,
  358. SCHED_TIME BIGINT(13) NOT NULL,
  359. PRIORITY INTEGER NOT NULL,
  360. STATE VARCHAR(16) NOT NULL,
  361. JOB_NAME VARCHAR(200) NULL,
  362. JOB_GROUP VARCHAR(200) NULL,
  363. IS_NONCONCURRENT VARCHAR(1) NULL,
  364. REQUESTS_RECOVERY VARCHAR(1) NULL,
  365. PRIMARY KEY (SCHED_NAME, ENTRY_ID)
  366. )
  367. ENGINE = InnoDB
  368. DEFAULT CHARSET = utf8;
  369. CREATE TABLE QRTZ_SCHEDULER_STATE
  370. (
  371. SCHED_NAME VARCHAR(120) NOT NULL,
  372. INSTANCE_NAME VARCHAR(200) NOT NULL,
  373. LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
  374. CHECKIN_INTERVAL BIGINT(13) NOT NULL,
  375. PRIMARY KEY (SCHED_NAME, INSTANCE_NAME)
  376. )
  377. ENGINE = InnoDB
  378. DEFAULT CHARSET = utf8;
  379. CREATE TABLE QRTZ_LOCKS
  380. (
  381. SCHED_NAME VARCHAR(120) NOT NULL,
  382. LOCK_NAME VARCHAR(40) NOT NULL,
  383. PRIMARY KEY (SCHED_NAME, LOCK_NAME)
  384. )
  385. ENGINE = InnoDB
  386. DEFAULT CHARSET = utf8;
  387. CREATE INDEX IDX_QRTZ_J_REQ_RECOVERY ON QRTZ_JOB_DETAILS (SCHED_NAME, REQUESTS_RECOVERY);
  388. CREATE INDEX IDX_QRTZ_J_GRP ON QRTZ_JOB_DETAILS (SCHED_NAME, JOB_GROUP);
  389. CREATE INDEX IDX_QRTZ_T_J ON QRTZ_TRIGGERS (SCHED_NAME, JOB_NAME, JOB_GROUP);
  390. CREATE INDEX IDX_QRTZ_T_JG ON QRTZ_TRIGGERS (SCHED_NAME, JOB_GROUP);
  391. CREATE INDEX IDX_QRTZ_T_C ON QRTZ_TRIGGERS (SCHED_NAME, CALENDAR_NAME);
  392. CREATE INDEX IDX_QRTZ_T_G ON QRTZ_TRIGGERS (SCHED_NAME, TRIGGER_GROUP);
  393. CREATE INDEX IDX_QRTZ_T_STATE ON QRTZ_TRIGGERS (SCHED_NAME, TRIGGER_STATE);
  394. CREATE INDEX IDX_QRTZ_T_N_STATE ON QRTZ_TRIGGERS (SCHED_NAME, TRIGGER_NAME, TRIGGER_GROUP, TRIGGER_STATE);
  395. CREATE INDEX IDX_QRTZ_T_N_G_STATE ON QRTZ_TRIGGERS (SCHED_NAME, TRIGGER_GROUP, TRIGGER_STATE);
  396. CREATE INDEX IDX_QRTZ_T_NEXT_FIRE_TIME ON QRTZ_TRIGGERS (SCHED_NAME, NEXT_FIRE_TIME);
  397. CREATE INDEX IDX_QRTZ_T_NFT_ST ON QRTZ_TRIGGERS (SCHED_NAME, TRIGGER_STATE, NEXT_FIRE_TIME);
  398. CREATE INDEX IDX_QRTZ_T_NFT_MISFIRE ON QRTZ_TRIGGERS (SCHED_NAME, MISFIRE_INSTR, NEXT_FIRE_TIME);
  399. CREATE INDEX IDX_QRTZ_T_NFT_ST_MISFIRE ON QRTZ_TRIGGERS (SCHED_NAME, MISFIRE_INSTR, NEXT_FIRE_TIME, TRIGGER_STATE);
  400. CREATE INDEX IDX_QRTZ_T_NFT_ST_MISFIRE_GRP ON QRTZ_TRIGGERS (SCHED_NAME, MISFIRE_INSTR, NEXT_FIRE_TIME, TRIGGER_GROUP,
  401. TRIGGER_STATE);
  402. CREATE INDEX IDX_QRTZ_FT_TRIG_INST_NAME ON QRTZ_FIRED_TRIGGERS (SCHED_NAME, INSTANCE_NAME);
  403. CREATE INDEX IDX_QRTZ_FT_INST_JOB_REQ_RCVRY ON QRTZ_FIRED_TRIGGERS (SCHED_NAME, INSTANCE_NAME, REQUESTS_RECOVERY);
  404. CREATE INDEX IDX_QRTZ_FT_J_G ON QRTZ_FIRED_TRIGGERS (SCHED_NAME, JOB_NAME, JOB_GROUP);
  405. CREATE INDEX IDX_QRTZ_FT_JG ON QRTZ_FIRED_TRIGGERS (SCHED_NAME, JOB_GROUP);
  406. CREATE INDEX IDX_QRTZ_FT_T_G ON QRTZ_FIRED_TRIGGERS (SCHED_NAME, TRIGGER_NAME, TRIGGER_GROUP);
  407. CREATE INDEX IDX_QRTZ_FT_TG ON QRTZ_FIRED_TRIGGERS (SCHED_NAME, TRIGGER_GROUP);