dolphinscheduler_mysql.sql 38 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854
  1. /*
  2. * Licensed to the Apache Software Foundation (ASF) under one or more
  3. * contributor license agreements. See the NOTICE file distributed with
  4. * this work for additional information regarding copyright ownership.
  5. * The ASF licenses this file to You under the Apache License, Version 2.0
  6. * (the "License"); you may not use this file except in compliance with
  7. * the License. You may obtain a copy of the License at
  8. *
  9. * http://www.apache.org/licenses/LICENSE-2.0
  10. *
  11. * Unless required by applicable law or agreed to in writing, software
  12. * distributed under the License is distributed on an "AS IS" BASIS,
  13. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. * See the License for the specific language governing permissions and
  15. * limitations under the License.
  16. */
  17. SET FOREIGN_KEY_CHECKS=0;
  18. -- ----------------------------
  19. -- Table structure for QRTZ_BLOB_TRIGGERS
  20. -- ----------------------------
  21. DROP TABLE IF EXISTS `QRTZ_BLOB_TRIGGERS`;
  22. CREATE TABLE `QRTZ_BLOB_TRIGGERS` (
  23. `SCHED_NAME` varchar(120) NOT NULL,
  24. `TRIGGER_NAME` varchar(200) NOT NULL,
  25. `TRIGGER_GROUP` varchar(200) NOT NULL,
  26. `BLOB_DATA` blob,
  27. PRIMARY KEY (`SCHED_NAME`,`TRIGGER_NAME`,`TRIGGER_GROUP`),
  28. KEY `SCHED_NAME` (`SCHED_NAME`,`TRIGGER_NAME`,`TRIGGER_GROUP`),
  29. CONSTRAINT `QRTZ_BLOB_TRIGGERS_ibfk_1` FOREIGN KEY (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) REFERENCES `QRTZ_TRIGGERS` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`)
  30. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  31. -- ----------------------------
  32. -- Records of QRTZ_BLOB_TRIGGERS
  33. -- ----------------------------
  34. -- ----------------------------
  35. -- Table structure for QRTZ_CALENDARS
  36. -- ----------------------------
  37. DROP TABLE IF EXISTS `QRTZ_CALENDARS`;
  38. CREATE TABLE `QRTZ_CALENDARS` (
  39. `SCHED_NAME` varchar(120) NOT NULL,
  40. `CALENDAR_NAME` varchar(200) NOT NULL,
  41. `CALENDAR` blob NOT NULL,
  42. PRIMARY KEY (`SCHED_NAME`,`CALENDAR_NAME`)
  43. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  44. -- ----------------------------
  45. -- Records of QRTZ_CALENDARS
  46. -- ----------------------------
  47. -- ----------------------------
  48. -- Table structure for QRTZ_CRON_TRIGGERS
  49. -- ----------------------------
  50. DROP TABLE IF EXISTS `QRTZ_CRON_TRIGGERS`;
  51. CREATE TABLE `QRTZ_CRON_TRIGGERS` (
  52. `SCHED_NAME` varchar(120) NOT NULL,
  53. `TRIGGER_NAME` varchar(200) NOT NULL,
  54. `TRIGGER_GROUP` varchar(200) NOT NULL,
  55. `CRON_EXPRESSION` varchar(120) NOT NULL,
  56. `TIME_ZONE_ID` varchar(80) DEFAULT NULL,
  57. PRIMARY KEY (`SCHED_NAME`,`TRIGGER_NAME`,`TRIGGER_GROUP`),
  58. CONSTRAINT `QRTZ_CRON_TRIGGERS_ibfk_1` FOREIGN KEY (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) REFERENCES `QRTZ_TRIGGERS` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`)
  59. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  60. -- ----------------------------
  61. -- Records of QRTZ_CRON_TRIGGERS
  62. -- ----------------------------
  63. -- ----------------------------
  64. -- Table structure for QRTZ_FIRED_TRIGGERS
  65. -- ----------------------------
  66. DROP TABLE IF EXISTS `QRTZ_FIRED_TRIGGERS`;
  67. CREATE TABLE `QRTZ_FIRED_TRIGGERS` (
  68. `SCHED_NAME` varchar(120) NOT NULL,
  69. `ENTRY_ID` varchar(95) NOT NULL,
  70. `TRIGGER_NAME` varchar(200) NOT NULL,
  71. `TRIGGER_GROUP` varchar(200) NOT NULL,
  72. `INSTANCE_NAME` varchar(200) NOT NULL,
  73. `FIRED_TIME` bigint(13) NOT NULL,
  74. `SCHED_TIME` bigint(13) NOT NULL,
  75. `PRIORITY` int(11) NOT NULL,
  76. `STATE` varchar(16) NOT NULL,
  77. `JOB_NAME` varchar(200) DEFAULT NULL,
  78. `JOB_GROUP` varchar(200) DEFAULT NULL,
  79. `IS_NONCONCURRENT` varchar(1) DEFAULT NULL,
  80. `REQUESTS_RECOVERY` varchar(1) DEFAULT NULL,
  81. PRIMARY KEY (`SCHED_NAME`,`ENTRY_ID`),
  82. KEY `IDX_QRTZ_FT_TRIG_INST_NAME` (`SCHED_NAME`,`INSTANCE_NAME`),
  83. KEY `IDX_QRTZ_FT_INST_JOB_REQ_RCVRY` (`SCHED_NAME`,`INSTANCE_NAME`,`REQUESTS_RECOVERY`),
  84. KEY `IDX_QRTZ_FT_J_G` (`SCHED_NAME`,`JOB_NAME`,`JOB_GROUP`),
  85. KEY `IDX_QRTZ_FT_JG` (`SCHED_NAME`,`JOB_GROUP`),
  86. KEY `IDX_QRTZ_FT_T_G` (`SCHED_NAME`,`TRIGGER_NAME`,`TRIGGER_GROUP`),
  87. KEY `IDX_QRTZ_FT_TG` (`SCHED_NAME`,`TRIGGER_GROUP`)
  88. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  89. -- ----------------------------
  90. -- Records of QRTZ_FIRED_TRIGGERS
  91. -- ----------------------------
  92. -- ----------------------------
  93. -- Table structure for QRTZ_JOB_DETAILS
  94. -- ----------------------------
  95. DROP TABLE IF EXISTS `QRTZ_JOB_DETAILS`;
  96. CREATE TABLE `QRTZ_JOB_DETAILS` (
  97. `SCHED_NAME` varchar(120) NOT NULL,
  98. `JOB_NAME` varchar(200) NOT NULL,
  99. `JOB_GROUP` varchar(200) NOT NULL,
  100. `DESCRIPTION` varchar(250) DEFAULT NULL,
  101. `JOB_CLASS_NAME` varchar(250) NOT NULL,
  102. `IS_DURABLE` varchar(1) NOT NULL,
  103. `IS_NONCONCURRENT` varchar(1) NOT NULL,
  104. `IS_UPDATE_DATA` varchar(1) NOT NULL,
  105. `REQUESTS_RECOVERY` varchar(1) NOT NULL,
  106. `JOB_DATA` blob,
  107. PRIMARY KEY (`SCHED_NAME`,`JOB_NAME`,`JOB_GROUP`),
  108. KEY `IDX_QRTZ_J_REQ_RECOVERY` (`SCHED_NAME`,`REQUESTS_RECOVERY`),
  109. KEY `IDX_QRTZ_J_GRP` (`SCHED_NAME`,`JOB_GROUP`)
  110. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  111. -- ----------------------------
  112. -- Records of QRTZ_JOB_DETAILS
  113. -- ----------------------------
  114. -- ----------------------------
  115. -- Table structure for QRTZ_LOCKS
  116. -- ----------------------------
  117. DROP TABLE IF EXISTS `QRTZ_LOCKS`;
  118. CREATE TABLE `QRTZ_LOCKS` (
  119. `SCHED_NAME` varchar(120) NOT NULL,
  120. `LOCK_NAME` varchar(40) NOT NULL,
  121. PRIMARY KEY (`SCHED_NAME`,`LOCK_NAME`)
  122. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  123. -- ----------------------------
  124. -- Records of QRTZ_LOCKS
  125. -- ----------------------------
  126. -- ----------------------------
  127. -- Table structure for QRTZ_PAUSED_TRIGGER_GRPS
  128. -- ----------------------------
  129. DROP TABLE IF EXISTS `QRTZ_PAUSED_TRIGGER_GRPS`;
  130. CREATE TABLE `QRTZ_PAUSED_TRIGGER_GRPS` (
  131. `SCHED_NAME` varchar(120) NOT NULL,
  132. `TRIGGER_GROUP` varchar(200) NOT NULL,
  133. PRIMARY KEY (`SCHED_NAME`,`TRIGGER_GROUP`)
  134. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  135. -- ----------------------------
  136. -- Records of QRTZ_PAUSED_TRIGGER_GRPS
  137. -- ----------------------------
  138. -- ----------------------------
  139. -- Table structure for QRTZ_SCHEDULER_STATE
  140. -- ----------------------------
  141. DROP TABLE IF EXISTS `QRTZ_SCHEDULER_STATE`;
  142. CREATE TABLE `QRTZ_SCHEDULER_STATE` (
  143. `SCHED_NAME` varchar(120) NOT NULL,
  144. `INSTANCE_NAME` varchar(200) NOT NULL,
  145. `LAST_CHECKIN_TIME` bigint(13) NOT NULL,
  146. `CHECKIN_INTERVAL` bigint(13) NOT NULL,
  147. PRIMARY KEY (`SCHED_NAME`,`INSTANCE_NAME`)
  148. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  149. -- ----------------------------
  150. -- Records of QRTZ_SCHEDULER_STATE
  151. -- ----------------------------
  152. -- ----------------------------
  153. -- Table structure for QRTZ_SIMPLE_TRIGGERS
  154. -- ----------------------------
  155. DROP TABLE IF EXISTS `QRTZ_SIMPLE_TRIGGERS`;
  156. CREATE TABLE `QRTZ_SIMPLE_TRIGGERS` (
  157. `SCHED_NAME` varchar(120) NOT NULL,
  158. `TRIGGER_NAME` varchar(200) NOT NULL,
  159. `TRIGGER_GROUP` varchar(200) NOT NULL,
  160. `REPEAT_COUNT` bigint(7) NOT NULL,
  161. `REPEAT_INTERVAL` bigint(12) NOT NULL,
  162. `TIMES_TRIGGERED` bigint(10) NOT NULL,
  163. PRIMARY KEY (`SCHED_NAME`,`TRIGGER_NAME`,`TRIGGER_GROUP`),
  164. CONSTRAINT `QRTZ_SIMPLE_TRIGGERS_ibfk_1` FOREIGN KEY (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) REFERENCES `QRTZ_TRIGGERS` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`)
  165. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  166. -- ----------------------------
  167. -- Records of QRTZ_SIMPLE_TRIGGERS
  168. -- ----------------------------
  169. -- ----------------------------
  170. -- Table structure for QRTZ_SIMPROP_TRIGGERS
  171. -- ----------------------------
  172. DROP TABLE IF EXISTS `QRTZ_SIMPROP_TRIGGERS`;
  173. CREATE TABLE `QRTZ_SIMPROP_TRIGGERS` (
  174. `SCHED_NAME` varchar(120) NOT NULL,
  175. `TRIGGER_NAME` varchar(200) NOT NULL,
  176. `TRIGGER_GROUP` varchar(200) NOT NULL,
  177. `STR_PROP_1` varchar(512) DEFAULT NULL,
  178. `STR_PROP_2` varchar(512) DEFAULT NULL,
  179. `STR_PROP_3` varchar(512) DEFAULT NULL,
  180. `INT_PROP_1` int(11) DEFAULT NULL,
  181. `INT_PROP_2` int(11) DEFAULT NULL,
  182. `LONG_PROP_1` bigint(20) DEFAULT NULL,
  183. `LONG_PROP_2` bigint(20) DEFAULT NULL,
  184. `DEC_PROP_1` decimal(13,4) DEFAULT NULL,
  185. `DEC_PROP_2` decimal(13,4) DEFAULT NULL,
  186. `BOOL_PROP_1` varchar(1) DEFAULT NULL,
  187. `BOOL_PROP_2` varchar(1) DEFAULT NULL,
  188. PRIMARY KEY (`SCHED_NAME`,`TRIGGER_NAME`,`TRIGGER_GROUP`),
  189. CONSTRAINT `QRTZ_SIMPROP_TRIGGERS_ibfk_1` FOREIGN KEY (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) REFERENCES `QRTZ_TRIGGERS` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`)
  190. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  191. -- ----------------------------
  192. -- Records of QRTZ_SIMPROP_TRIGGERS
  193. -- ----------------------------
  194. -- ----------------------------
  195. -- Table structure for QRTZ_TRIGGERS
  196. -- ----------------------------
  197. DROP TABLE IF EXISTS `QRTZ_TRIGGERS`;
  198. CREATE TABLE `QRTZ_TRIGGERS` (
  199. `SCHED_NAME` varchar(120) NOT NULL,
  200. `TRIGGER_NAME` varchar(200) NOT NULL,
  201. `TRIGGER_GROUP` varchar(200) NOT NULL,
  202. `JOB_NAME` varchar(200) NOT NULL,
  203. `JOB_GROUP` varchar(200) NOT NULL,
  204. `DESCRIPTION` varchar(250) DEFAULT NULL,
  205. `NEXT_FIRE_TIME` bigint(13) DEFAULT NULL,
  206. `PREV_FIRE_TIME` bigint(13) DEFAULT NULL,
  207. `PRIORITY` int(11) DEFAULT NULL,
  208. `TRIGGER_STATE` varchar(16) NOT NULL,
  209. `TRIGGER_TYPE` varchar(8) NOT NULL,
  210. `START_TIME` bigint(13) NOT NULL,
  211. `END_TIME` bigint(13) DEFAULT NULL,
  212. `CALENDAR_NAME` varchar(200) DEFAULT NULL,
  213. `MISFIRE_INSTR` smallint(2) DEFAULT NULL,
  214. `JOB_DATA` blob,
  215. PRIMARY KEY (`SCHED_NAME`,`TRIGGER_NAME`,`TRIGGER_GROUP`),
  216. KEY `IDX_QRTZ_T_J` (`SCHED_NAME`,`JOB_NAME`,`JOB_GROUP`),
  217. KEY `IDX_QRTZ_T_JG` (`SCHED_NAME`,`JOB_GROUP`),
  218. KEY `IDX_QRTZ_T_C` (`SCHED_NAME`,`CALENDAR_NAME`),
  219. KEY `IDX_QRTZ_T_G` (`SCHED_NAME`,`TRIGGER_GROUP`),
  220. KEY `IDX_QRTZ_T_STATE` (`SCHED_NAME`,`TRIGGER_STATE`),
  221. KEY `IDX_QRTZ_T_N_STATE` (`SCHED_NAME`,`TRIGGER_NAME`,`TRIGGER_GROUP`,`TRIGGER_STATE`),
  222. KEY `IDX_QRTZ_T_N_G_STATE` (`SCHED_NAME`,`TRIGGER_GROUP`,`TRIGGER_STATE`),
  223. KEY `IDX_QRTZ_T_NEXT_FIRE_TIME` (`SCHED_NAME`,`NEXT_FIRE_TIME`),
  224. KEY `IDX_QRTZ_T_NFT_ST` (`SCHED_NAME`,`TRIGGER_STATE`,`NEXT_FIRE_TIME`),
  225. KEY `IDX_QRTZ_T_NFT_MISFIRE` (`SCHED_NAME`,`MISFIRE_INSTR`,`NEXT_FIRE_TIME`),
  226. KEY `IDX_QRTZ_T_NFT_ST_MISFIRE` (`SCHED_NAME`,`MISFIRE_INSTR`,`NEXT_FIRE_TIME`,`TRIGGER_STATE`),
  227. KEY `IDX_QRTZ_T_NFT_ST_MISFIRE_GRP` (`SCHED_NAME`,`MISFIRE_INSTR`,`NEXT_FIRE_TIME`,`TRIGGER_GROUP`,`TRIGGER_STATE`),
  228. CONSTRAINT `QRTZ_TRIGGERS_ibfk_1` FOREIGN KEY (`SCHED_NAME`, `JOB_NAME`, `JOB_GROUP`) REFERENCES `QRTZ_JOB_DETAILS` (`SCHED_NAME`, `JOB_NAME`, `JOB_GROUP`)
  229. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  230. -- ----------------------------
  231. -- Records of QRTZ_TRIGGERS
  232. -- ----------------------------
  233. -- ----------------------------
  234. -- Table structure for t_ds_access_token
  235. -- ----------------------------
  236. DROP TABLE IF EXISTS `t_ds_access_token`;
  237. CREATE TABLE `t_ds_access_token` (
  238. `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'key',
  239. `user_id` int(11) DEFAULT NULL COMMENT 'user id',
  240. `token` varchar(64) DEFAULT NULL COMMENT 'token',
  241. `expire_time` datetime DEFAULT NULL COMMENT 'end time of token ',
  242. `create_time` datetime DEFAULT NULL COMMENT 'create time',
  243. `update_time` datetime DEFAULT NULL COMMENT 'update time',
  244. PRIMARY KEY (`id`)
  245. ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
  246. -- ----------------------------
  247. -- Records of t_ds_access_token
  248. -- ----------------------------
  249. -- ----------------------------
  250. -- Table structure for t_ds_alert
  251. -- ----------------------------
  252. DROP TABLE IF EXISTS `t_ds_alert`;
  253. CREATE TABLE `t_ds_alert` (
  254. `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'key',
  255. `title` varchar(64) DEFAULT NULL COMMENT 'title',
  256. `content` text COMMENT 'Message content (can be email, can be SMS. Mail is stored in JSON map, and SMS is string)',
  257. `alert_status` tinyint(4) DEFAULT '0' COMMENT '0:wait running,1:success,2:failed',
  258. `log` text COMMENT 'log',
  259. `alertgroup_id` int(11) DEFAULT NULL COMMENT 'alert group id',
  260. `create_time` datetime DEFAULT NULL COMMENT 'create time',
  261. `update_time` datetime DEFAULT NULL COMMENT 'update time',
  262. PRIMARY KEY (`id`)
  263. ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
  264. -- ----------------------------
  265. -- Records of t_ds_alert
  266. -- ----------------------------
  267. -- ----------------------------
  268. -- Table structure for t_ds_alertgroup
  269. -- ----------------------------
  270. DROP TABLE IF EXISTS `t_ds_alertgroup`;
  271. CREATE TABLE `t_ds_alertgroup`(
  272. `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'key',
  273. `alert_instance_ids` varchar (255) DEFAULT NULL COMMENT 'alert instance ids',
  274. `create_user_id` int(11) DEFAULT NULL COMMENT 'create user id',
  275. `group_name` varchar(255) DEFAULT NULL COMMENT 'group name',
  276. `description` varchar(255) DEFAULT NULL,
  277. `create_time` datetime DEFAULT NULL COMMENT 'create time',
  278. `update_time` datetime DEFAULT NULL COMMENT 'update time',
  279. PRIMARY KEY (`id`)
  280. ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
  281. -- ----------------------------
  282. -- Records of t_ds_alertgroup
  283. -- ----------------------------
  284. -- ----------------------------
  285. -- Table structure for t_ds_command
  286. -- ----------------------------
  287. DROP TABLE IF EXISTS `t_ds_command`;
  288. CREATE TABLE `t_ds_command` (
  289. `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'key',
  290. `command_type` tinyint(4) DEFAULT NULL COMMENT 'Command type: 0 start workflow, 1 start execution from current node, 2 resume fault-tolerant workflow, 3 resume pause process, 4 start execution from failed node, 5 complement, 6 schedule, 7 rerun, 8 pause, 9 stop, 10 resume waiting thread',
  291. `process_definition_id` int(11) DEFAULT NULL COMMENT 'process definition id',
  292. `command_param` text COMMENT 'json command parameters',
  293. `task_depend_type` tinyint(4) DEFAULT NULL COMMENT 'Node dependency type: 0 current node, 1 forward, 2 backward',
  294. `failure_strategy` tinyint(4) DEFAULT '0' COMMENT 'Failed policy: 0 end, 1 continue',
  295. `warning_type` tinyint(4) DEFAULT '0' COMMENT 'Alarm type: 0 is not sent, 1 process is sent successfully, 2 process is sent failed, 3 process is sent successfully and all failures are sent',
  296. `warning_group_id` int(11) DEFAULT NULL COMMENT 'warning group',
  297. `schedule_time` datetime DEFAULT NULL COMMENT 'schedule time',
  298. `start_time` datetime DEFAULT NULL COMMENT 'start time',
  299. `executor_id` int(11) DEFAULT NULL COMMENT 'executor id',
  300. `dependence` varchar(255) DEFAULT NULL COMMENT 'dependence',
  301. `update_time` datetime DEFAULT NULL COMMENT 'update time',
  302. `process_instance_priority` int(11) DEFAULT NULL COMMENT 'process instance priority: 0 Highest,1 High,2 Medium,3 Low,4 Lowest',
  303. `worker_group` varchar(64) COMMENT 'worker group',
  304. PRIMARY KEY (`id`)
  305. ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
  306. -- ----------------------------
  307. -- Records of t_ds_command
  308. -- ----------------------------
  309. -- ----------------------------
  310. -- Table structure for t_ds_datasource
  311. -- ----------------------------
  312. DROP TABLE IF EXISTS `t_ds_datasource`;
  313. CREATE TABLE `t_ds_datasource` (
  314. `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'key',
  315. `name` varchar(64) NOT NULL COMMENT 'data source name',
  316. `note` varchar(256) DEFAULT NULL COMMENT 'description',
  317. `type` tinyint(4) NOT NULL COMMENT 'data source type: 0:mysql,1:postgresql,2:hive,3:spark',
  318. `user_id` int(11) NOT NULL COMMENT 'the creator id',
  319. `connection_params` text NOT NULL COMMENT 'json connection params',
  320. `create_time` datetime NOT NULL COMMENT 'create time',
  321. `update_time` datetime DEFAULT NULL COMMENT 'update time',
  322. PRIMARY KEY (`id`)
  323. ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
  324. -- ----------------------------
  325. -- Records of t_ds_datasource
  326. -- ----------------------------
  327. -- ----------------------------
  328. -- Table structure for t_ds_error_command
  329. -- ----------------------------
  330. DROP TABLE IF EXISTS `t_ds_error_command`;
  331. CREATE TABLE `t_ds_error_command` (
  332. `id` int(11) NOT NULL COMMENT 'key',
  333. `command_type` tinyint(4) DEFAULT NULL COMMENT 'command type',
  334. `executor_id` int(11) DEFAULT NULL COMMENT 'executor id',
  335. `process_definition_id` int(11) DEFAULT NULL COMMENT 'process definition id',
  336. `command_param` text COMMENT 'json command parameters',
  337. `task_depend_type` tinyint(4) DEFAULT NULL COMMENT 'task depend type',
  338. `failure_strategy` tinyint(4) DEFAULT '0' COMMENT 'failure strategy',
  339. `warning_type` tinyint(4) DEFAULT '0' COMMENT 'warning type',
  340. `warning_group_id` int(11) DEFAULT NULL COMMENT 'warning group id',
  341. `schedule_time` datetime DEFAULT NULL COMMENT 'scheduler time',
  342. `start_time` datetime DEFAULT NULL COMMENT 'start time',
  343. `update_time` datetime DEFAULT NULL COMMENT 'update time',
  344. `dependence` text COMMENT 'dependence',
  345. `process_instance_priority` int(11) DEFAULT NULL COMMENT 'process instance priority, 0 Highest,1 High,2 Medium,3 Low,4 Lowest',
  346. `worker_group` varchar(64) COMMENT 'worker group',
  347. `message` text COMMENT 'message',
  348. PRIMARY KEY (`id`) USING BTREE
  349. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
  350. -- ----------------------------
  351. -- Records of t_ds_error_command
  352. -- ----------------------------
  353. -- ----------------------------
  354. -- Table structure for t_ds_process_definition
  355. -- ----------------------------
  356. DROP TABLE IF EXISTS `t_ds_process_definition`;
  357. CREATE TABLE `t_ds_process_definition` (
  358. `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'key',
  359. `name` varchar(255) DEFAULT NULL COMMENT 'process definition name',
  360. `version` int(11) DEFAULT NULL COMMENT 'process definition version',
  361. `release_state` tinyint(4) DEFAULT NULL COMMENT 'process definition release state:0:offline,1:online',
  362. `project_id` int(11) DEFAULT NULL COMMENT 'project id',
  363. `user_id` int(11) DEFAULT NULL COMMENT 'process definition creator id',
  364. `process_definition_json` longtext COMMENT 'process definition json content',
  365. `description` text,
  366. `global_params` text COMMENT 'global parameters',
  367. `flag` tinyint(4) DEFAULT NULL COMMENT '0 not available, 1 available',
  368. `locations` text COMMENT 'Node location information',
  369. `connects` text COMMENT 'Node connection information',
  370. `warning_group_id` int(11) DEFAULT NULL COMMENT 'alert group id',
  371. `create_time` datetime DEFAULT NULL COMMENT 'create time',
  372. `timeout` int(11) DEFAULT '0' COMMENT 'time out',
  373. `tenant_id` int(11) NOT NULL DEFAULT '-1' COMMENT 'tenant id',
  374. `update_time` datetime DEFAULT NULL COMMENT 'update time',
  375. `modify_by` varchar(255) DEFAULT NULL,
  376. `resource_ids` varchar(255) DEFAULT NULL,
  377. PRIMARY KEY (`id`),
  378. UNIQUE KEY `process_definition_unique` (`name`,`project_id`),
  379. KEY `process_definition_index` (`project_id`,`id`) USING BTREE
  380. ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
  381. -- ----------------------------
  382. -- Records of t_ds_process_definition
  383. -- ----------------------------
  384. -- ----------------------------
  385. -- Table structure for t_ds_process_definition_version
  386. -- ----------------------------
  387. DROP TABLE IF EXISTS `t_ds_process_definition_version`;
  388. CREATE TABLE `t_ds_process_definition_version` (
  389. `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'key',
  390. `process_definition_id` int(11) NOT NULL COMMENT 'process definition id',
  391. `version` int(11) DEFAULT NULL COMMENT 'process definition version',
  392. `process_definition_json` longtext COMMENT 'process definition json content',
  393. `description` text,
  394. `global_params` text COMMENT 'global parameters',
  395. `locations` text COMMENT 'Node location information',
  396. `connects` text COMMENT 'Node connection information',
  397. `warning_group_id` int(11) DEFAULT NULL COMMENT 'alert group id',
  398. `create_time` datetime DEFAULT NULL COMMENT 'create time',
  399. `timeout` int(11) DEFAULT '0' COMMENT 'time out',
  400. `resource_ids` varchar(255) DEFAULT NULL COMMENT 'resource ids',
  401. PRIMARY KEY (`id`),
  402. UNIQUE KEY `process_definition_id_and_version` (`process_definition_id`,`version`) USING BTREE,
  403. KEY `process_definition_index` (`id`) USING BTREE
  404. ) ENGINE=InnoDB AUTO_INCREMENT=84 DEFAULT CHARSET=utf8;
  405. -- ----------------------------
  406. -- Records of t_ds_process_definition
  407. -- ----------------------------
  408. -- ----------------------------
  409. -- Table structure for t_ds_process_instance
  410. -- ----------------------------
  411. DROP TABLE IF EXISTS `t_ds_process_instance`;
  412. CREATE TABLE `t_ds_process_instance` (
  413. `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'key',
  414. `name` varchar(255) DEFAULT NULL COMMENT 'process instance name',
  415. `process_definition_id` int(11) DEFAULT NULL COMMENT 'process definition id',
  416. `state` tinyint(4) DEFAULT NULL COMMENT 'process instance Status: 0 commit succeeded, 1 running, 2 prepare to pause, 3 pause, 4 prepare to stop, 5 stop, 6 fail, 7 succeed, 8 need fault tolerance, 9 kill, 10 wait for thread, 11 wait for dependency to complete',
  417. `recovery` tinyint(4) DEFAULT NULL COMMENT 'process instance failover flag:0:normal,1:failover instance',
  418. `start_time` datetime DEFAULT NULL COMMENT 'process instance start time',
  419. `end_time` datetime DEFAULT NULL COMMENT 'process instance end time',
  420. `run_times` int(11) DEFAULT NULL COMMENT 'process instance run times',
  421. `host` varchar(135) DEFAULT NULL COMMENT 'process instance host',
  422. `command_type` tinyint(4) DEFAULT NULL COMMENT 'command type',
  423. `command_param` text COMMENT 'json command parameters',
  424. `task_depend_type` tinyint(4) DEFAULT NULL COMMENT 'task depend type. 0: only current node,1:before the node,2:later nodes',
  425. `max_try_times` tinyint(4) DEFAULT '0' COMMENT 'max try times',
  426. `failure_strategy` tinyint(4) DEFAULT '0' COMMENT 'failure strategy. 0:end the process when node failed,1:continue running the other nodes when node failed',
  427. `warning_type` tinyint(4) DEFAULT '0' COMMENT 'warning type. 0:no warning,1:warning if process success,2:warning if process failed,3:warning if success',
  428. `warning_group_id` int(11) DEFAULT NULL COMMENT 'warning group id',
  429. `schedule_time` datetime DEFAULT NULL COMMENT 'schedule time',
  430. `command_start_time` datetime DEFAULT NULL COMMENT 'command start time',
  431. `global_params` text COMMENT 'global parameters',
  432. `process_instance_json` longtext COMMENT 'process instance json(copy的process definition 的json)',
  433. `flag` tinyint(4) DEFAULT '1' COMMENT 'flag',
  434. `update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  435. `is_sub_process` int(11) DEFAULT '0' COMMENT 'flag, whether the process is sub process',
  436. `executor_id` int(11) NOT NULL COMMENT 'executor id',
  437. `locations` text COMMENT 'Node location information',
  438. `connects` text COMMENT 'Node connection information',
  439. `history_cmd` text COMMENT 'history commands of process instance operation',
  440. `dependence_schedule_times` text COMMENT 'depend schedule fire time',
  441. `process_instance_priority` int(11) DEFAULT NULL COMMENT 'process instance priority. 0 Highest,1 High,2 Medium,3 Low,4 Lowest',
  442. `worker_group` varchar(64) DEFAULT NULL COMMENT 'worker group id',
  443. `timeout` int(11) DEFAULT '0' COMMENT 'time out',
  444. `tenant_id` int(11) NOT NULL DEFAULT '-1' COMMENT 'tenant id',
  445. `var_pool` longtext COMMENT 'var_pool',
  446. PRIMARY KEY (`id`),
  447. KEY `process_instance_index` (`process_definition_id`,`id`) USING BTREE,
  448. KEY `start_time_index` (`start_time`) USING BTREE
  449. ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
  450. -- ----------------------------
  451. -- Records of t_ds_process_instance
  452. -- ----------------------------
  453. -- ----------------------------
  454. -- Table structure for t_ds_project
  455. -- ----------------------------
  456. DROP TABLE IF EXISTS `t_ds_project`;
  457. CREATE TABLE `t_ds_project` (
  458. `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'key',
  459. `name` varchar(100) DEFAULT NULL COMMENT 'project name',
  460. `description` varchar(200) DEFAULT NULL,
  461. `user_id` int(11) DEFAULT NULL COMMENT 'creator id',
  462. `flag` tinyint(4) DEFAULT '1' COMMENT '0 not available, 1 available',
  463. `create_time` datetime DEFAULT NULL COMMENT 'create time',
  464. `update_time` datetime DEFAULT NULL COMMENT 'update time',
  465. PRIMARY KEY (`id`),
  466. KEY `user_id_index` (`user_id`) USING BTREE
  467. ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
  468. -- ----------------------------
  469. -- Records of t_ds_project
  470. -- ----------------------------
  471. -- ----------------------------
  472. -- Table structure for t_ds_queue
  473. -- ----------------------------
  474. DROP TABLE IF EXISTS `t_ds_queue`;
  475. CREATE TABLE `t_ds_queue` (
  476. `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'key',
  477. `queue_name` varchar(64) DEFAULT NULL COMMENT 'queue name',
  478. `queue` varchar(64) DEFAULT NULL COMMENT 'yarn queue name',
  479. `create_time` datetime DEFAULT NULL COMMENT 'create time',
  480. `update_time` datetime DEFAULT NULL COMMENT 'update time',
  481. PRIMARY KEY (`id`)
  482. ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
  483. -- ----------------------------
  484. -- Records of t_ds_queue
  485. -- ----------------------------
  486. INSERT INTO `t_ds_queue` VALUES ('1', 'default', 'default', null, null);
  487. -- ----------------------------
  488. -- Table structure for t_ds_relation_datasource_user
  489. -- ----------------------------
  490. DROP TABLE IF EXISTS `t_ds_relation_datasource_user`;
  491. CREATE TABLE `t_ds_relation_datasource_user` (
  492. `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'key',
  493. `user_id` int(11) NOT NULL COMMENT 'user id',
  494. `datasource_id` int(11) DEFAULT NULL COMMENT 'data source id',
  495. `perm` int(11) DEFAULT '1' COMMENT 'limits of authority',
  496. `create_time` datetime DEFAULT NULL COMMENT 'create time',
  497. `update_time` datetime DEFAULT NULL COMMENT 'update time',
  498. PRIMARY KEY (`id`)
  499. ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
  500. -- ----------------------------
  501. -- Records of t_ds_relation_datasource_user
  502. -- ----------------------------
  503. -- ----------------------------
  504. -- Table structure for t_ds_relation_process_instance
  505. -- ----------------------------
  506. DROP TABLE IF EXISTS `t_ds_relation_process_instance`;
  507. CREATE TABLE `t_ds_relation_process_instance` (
  508. `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'key',
  509. `parent_process_instance_id` int(11) DEFAULT NULL COMMENT 'parent process instance id',
  510. `parent_task_instance_id` int(11) DEFAULT NULL COMMENT 'parent process instance id',
  511. `process_instance_id` int(11) DEFAULT NULL COMMENT 'child process instance id',
  512. PRIMARY KEY (`id`)
  513. ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
  514. -- ----------------------------
  515. -- Records of t_ds_relation_process_instance
  516. -- ----------------------------
  517. -- ----------------------------
  518. -- Table structure for t_ds_relation_project_user
  519. -- ----------------------------
  520. DROP TABLE IF EXISTS `t_ds_relation_project_user`;
  521. CREATE TABLE `t_ds_relation_project_user` (
  522. `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'key',
  523. `user_id` int(11) NOT NULL COMMENT 'user id',
  524. `project_id` int(11) DEFAULT NULL COMMENT 'project id',
  525. `perm` int(11) DEFAULT '1' COMMENT 'limits of authority',
  526. `create_time` datetime DEFAULT NULL COMMENT 'create time',
  527. `update_time` datetime DEFAULT NULL COMMENT 'update time',
  528. PRIMARY KEY (`id`),
  529. KEY `user_id_index` (`user_id`) USING BTREE
  530. ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
  531. -- ----------------------------
  532. -- Records of t_ds_relation_project_user
  533. -- ----------------------------
  534. -- ----------------------------
  535. -- Table structure for t_ds_relation_resources_user
  536. -- ----------------------------
  537. DROP TABLE IF EXISTS `t_ds_relation_resources_user`;
  538. CREATE TABLE `t_ds_relation_resources_user` (
  539. `id` int(11) NOT NULL AUTO_INCREMENT,
  540. `user_id` int(11) NOT NULL COMMENT 'user id',
  541. `resources_id` int(11) DEFAULT NULL COMMENT 'resource id',
  542. `perm` int(11) DEFAULT '1' COMMENT 'limits of authority',
  543. `create_time` datetime DEFAULT NULL COMMENT 'create time',
  544. `update_time` datetime DEFAULT NULL COMMENT 'update time',
  545. PRIMARY KEY (`id`)
  546. ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
  547. -- ----------------------------
  548. -- Records of t_ds_relation_resources_user
  549. -- ----------------------------
  550. -- ----------------------------
  551. -- Table structure for t_ds_relation_udfs_user
  552. -- ----------------------------
  553. DROP TABLE IF EXISTS `t_ds_relation_udfs_user`;
  554. CREATE TABLE `t_ds_relation_udfs_user` (
  555. `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'key',
  556. `user_id` int(11) NOT NULL COMMENT 'userid',
  557. `udf_id` int(11) DEFAULT NULL COMMENT 'udf id',
  558. `perm` int(11) DEFAULT '1' COMMENT 'limits of authority',
  559. `create_time` datetime DEFAULT NULL COMMENT 'create time',
  560. `update_time` datetime DEFAULT NULL COMMENT 'update time',
  561. PRIMARY KEY (`id`)
  562. ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
  563. -- ----------------------------
  564. -- Table structure for t_ds_resources
  565. -- ----------------------------
  566. DROP TABLE IF EXISTS `t_ds_resources`;
  567. CREATE TABLE `t_ds_resources` (
  568. `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'key',
  569. `alias` varchar(64) DEFAULT NULL COMMENT 'alias',
  570. `file_name` varchar(64) DEFAULT NULL COMMENT 'file name',
  571. `description` varchar(256) DEFAULT NULL,
  572. `user_id` int(11) DEFAULT NULL COMMENT 'user id',
  573. `type` tinyint(4) DEFAULT NULL COMMENT 'resource type,0:FILE,1:UDF',
  574. `size` bigint(20) DEFAULT NULL COMMENT 'resource size',
  575. `create_time` datetime DEFAULT NULL COMMENT 'create time',
  576. `update_time` datetime DEFAULT NULL COMMENT 'update time',
  577. `pid` int(11) DEFAULT NULL,
  578. `full_name` varchar(64) DEFAULT NULL,
  579. `is_directory` tinyint(4) DEFAULT NULL,
  580. PRIMARY KEY (`id`),
  581. UNIQUE KEY `t_ds_resources_un` (`full_name`,`type`)
  582. ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
  583. -- ----------------------------
  584. -- Records of t_ds_resources
  585. -- ----------------------------
  586. -- ----------------------------
  587. -- Table structure for t_ds_schedules
  588. -- ----------------------------
  589. DROP TABLE IF EXISTS `t_ds_schedules`;
  590. CREATE TABLE `t_ds_schedules` (
  591. `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'key',
  592. `process_definition_id` int(11) NOT NULL COMMENT 'process definition id',
  593. `start_time` datetime NOT NULL COMMENT 'start time',
  594. `end_time` datetime NOT NULL COMMENT 'end time',
  595. `crontab` varchar(256) NOT NULL COMMENT 'crontab description',
  596. `failure_strategy` tinyint(4) NOT NULL COMMENT 'failure strategy. 0:end,1:continue',
  597. `user_id` int(11) NOT NULL COMMENT 'user id',
  598. `release_state` tinyint(4) NOT NULL COMMENT 'release state. 0:offline,1:online ',
  599. `warning_type` tinyint(4) NOT NULL COMMENT 'Alarm type: 0 is not sent, 1 process is sent successfully, 2 process is sent failed, 3 process is sent successfully and all failures are sent',
  600. `warning_group_id` int(11) DEFAULT NULL COMMENT 'alert group id',
  601. `process_instance_priority` int(11) DEFAULT NULL COMMENT 'process instance priority:0 Highest,1 High,2 Medium,3 Low,4 Lowest',
  602. `worker_group` varchar(256) DEFAULT '' COMMENT 'worker group id',
  603. `create_time` datetime NOT NULL COMMENT 'create time',
  604. `update_time` datetime NOT NULL COMMENT 'update time',
  605. PRIMARY KEY (`id`)
  606. ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
  607. -- ----------------------------
  608. -- Records of t_ds_schedules
  609. -- ----------------------------
  610. -- ----------------------------
  611. -- Table structure for t_ds_session
  612. -- ----------------------------
  613. DROP TABLE IF EXISTS `t_ds_session`;
  614. CREATE TABLE `t_ds_session` (
  615. `id` varchar(64) NOT NULL COMMENT 'key',
  616. `user_id` int(11) DEFAULT NULL COMMENT 'user id',
  617. `ip` varchar(45) DEFAULT NULL COMMENT 'ip',
  618. `last_login_time` datetime DEFAULT NULL COMMENT 'last login time',
  619. PRIMARY KEY (`id`)
  620. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  621. -- ----------------------------
  622. -- Records of t_ds_session
  623. -- ----------------------------
  624. -- ----------------------------
  625. -- Table structure for t_ds_task_instance
  626. -- ----------------------------
  627. DROP TABLE IF EXISTS `t_ds_task_instance`;
  628. CREATE TABLE `t_ds_task_instance` (
  629. `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'key',
  630. `name` varchar(255) DEFAULT NULL COMMENT 'task name',
  631. `task_type` varchar(64) DEFAULT NULL COMMENT 'task type',
  632. `process_definition_id` int(11) DEFAULT NULL COMMENT 'process definition id',
  633. `process_instance_id` int(11) DEFAULT NULL COMMENT 'process instance id',
  634. `task_json` longtext COMMENT 'task content json',
  635. `state` tinyint(4) DEFAULT NULL COMMENT 'Status: 0 commit succeeded, 1 running, 2 prepare to pause, 3 pause, 4 prepare to stop, 5 stop, 6 fail, 7 succeed, 8 need fault tolerance, 9 kill, 10 wait for thread, 11 wait for dependency to complete',
  636. `submit_time` datetime DEFAULT NULL COMMENT 'task submit time',
  637. `start_time` datetime DEFAULT NULL COMMENT 'task start time',
  638. `end_time` datetime DEFAULT NULL COMMENT 'task end time',
  639. `host` varchar(135) DEFAULT NULL COMMENT 'host of task running on',
  640. `execute_path` varchar(200) DEFAULT NULL COMMENT 'task execute path in the host',
  641. `log_path` varchar(200) DEFAULT NULL COMMENT 'task log path',
  642. `alert_flag` tinyint(4) DEFAULT NULL COMMENT 'whether alert',
  643. `retry_times` int(4) DEFAULT '0' COMMENT 'task retry times',
  644. `pid` int(4) DEFAULT NULL COMMENT 'pid of task',
  645. `app_link` text COMMENT 'yarn app id',
  646. `flag` tinyint(4) DEFAULT '1' COMMENT '0 not available, 1 available',
  647. `retry_interval` int(4) DEFAULT NULL COMMENT 'retry interval when task failed ',
  648. `max_retry_times` int(2) DEFAULT NULL COMMENT 'max retry times',
  649. `task_instance_priority` int(11) DEFAULT NULL COMMENT 'task instance priority:0 Highest,1 High,2 Medium,3 Low,4 Lowest',
  650. `worker_group` varchar(64) DEFAULT NULL COMMENT 'worker group id',
  651. `executor_id` int(11) DEFAULT NULL,
  652. `first_submit_time` datetime DEFAULT NULL COMMENT 'task first submit time',
  653. `delay_time` int(4) DEFAULT '0' COMMENT 'task delay execution time',
  654. `var_pool` longtext COMMENT 'var_pool',
  655. PRIMARY KEY (`id`),
  656. KEY `process_instance_id` (`process_instance_id`) USING BTREE,
  657. KEY `task_instance_index` (`process_definition_id`,`process_instance_id`) USING BTREE,
  658. CONSTRAINT `foreign_key_instance_id` FOREIGN KEY (`process_instance_id`) REFERENCES `t_ds_process_instance` (`id`) ON DELETE CASCADE
  659. ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
  660. -- ----------------------------
  661. -- Records of t_ds_task_instance
  662. -- ----------------------------
  663. -- ----------------------------
  664. -- Table structure for t_ds_tenant
  665. -- ----------------------------
  666. DROP TABLE IF EXISTS `t_ds_tenant`;
  667. CREATE TABLE `t_ds_tenant` (
  668. `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'key',
  669. `tenant_code` varchar(64) DEFAULT NULL COMMENT 'tenant code',
  670. `description` varchar(256) DEFAULT NULL,
  671. `queue_id` int(11) DEFAULT NULL COMMENT 'queue id',
  672. `create_time` datetime DEFAULT NULL COMMENT 'create time',
  673. `update_time` datetime DEFAULT NULL COMMENT 'update time',
  674. PRIMARY KEY (`id`)
  675. ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
  676. -- ----------------------------
  677. -- Records of t_ds_tenant
  678. -- ----------------------------
  679. -- ----------------------------
  680. -- Table structure for t_ds_udfs
  681. -- ----------------------------
  682. DROP TABLE IF EXISTS `t_ds_udfs`;
  683. CREATE TABLE `t_ds_udfs` (
  684. `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'key',
  685. `user_id` int(11) NOT NULL COMMENT 'user id',
  686. `func_name` varchar(100) NOT NULL COMMENT 'UDF function name',
  687. `class_name` varchar(255) NOT NULL COMMENT 'class of udf',
  688. `type` tinyint(4) NOT NULL COMMENT 'Udf function type',
  689. `arg_types` varchar(255) DEFAULT NULL COMMENT 'arguments types',
  690. `database` varchar(255) DEFAULT NULL COMMENT 'data base',
  691. `description` varchar(255) DEFAULT NULL,
  692. `resource_id` int(11) NOT NULL COMMENT 'resource id',
  693. `resource_name` varchar(255) NOT NULL COMMENT 'resource name',
  694. `create_time` datetime NOT NULL COMMENT 'create time',
  695. `update_time` datetime NOT NULL COMMENT 'update time',
  696. PRIMARY KEY (`id`)
  697. ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
  698. -- ----------------------------
  699. -- Records of t_ds_udfs
  700. -- ----------------------------
  701. -- ----------------------------
  702. -- Table structure for t_ds_user
  703. -- ----------------------------
  704. DROP TABLE IF EXISTS `t_ds_user`;
  705. CREATE TABLE `t_ds_user` (
  706. `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'user id',
  707. `user_name` varchar(64) DEFAULT NULL COMMENT 'user name',
  708. `user_password` varchar(64) DEFAULT NULL COMMENT 'user password',
  709. `user_type` tinyint(4) DEFAULT NULL COMMENT 'user type, 0:administrator,1:ordinary user',
  710. `email` varchar(64) DEFAULT NULL COMMENT 'email',
  711. `phone` varchar(11) DEFAULT NULL COMMENT 'phone',
  712. `tenant_id` int(11) DEFAULT NULL COMMENT 'tenant id',
  713. `create_time` datetime DEFAULT NULL COMMENT 'create time',
  714. `update_time` datetime DEFAULT NULL COMMENT 'update time',
  715. `queue` varchar(64) DEFAULT NULL COMMENT 'queue',
  716. `state` int(1) DEFAULT 1 COMMENT 'state 0:disable 1:enable',
  717. PRIMARY KEY (`id`),
  718. UNIQUE KEY `user_name_unique` (`user_name`)
  719. ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
  720. -- ----------------------------
  721. -- Records of t_ds_user
  722. -- ----------------------------
  723. -- ----------------------------
  724. -- Table structure for t_ds_version
  725. -- ----------------------------
  726. DROP TABLE IF EXISTS `t_ds_version`;
  727. CREATE TABLE `t_ds_version` (
  728. `id` int(11) NOT NULL AUTO_INCREMENT,
  729. `version` varchar(200) NOT NULL,
  730. PRIMARY KEY (`id`),
  731. UNIQUE KEY `version_UNIQUE` (`version`)
  732. ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COMMENT='version';
  733. -- ----------------------------
  734. -- Records of t_ds_version
  735. -- ----------------------------
  736. INSERT INTO `t_ds_version`
  737. VALUES ('1', '1.3.0');
  738. -- ----------------------------
  739. -- Records of t_ds_alertgroup
  740. -- ----------------------------
  741. INSERT INTO `t_ds_alertgroup`(alert_instance_ids, create_user_id, group_name, description, create_time, update_time)
  742. VALUES ("1,2", 1, 'default admin warning group', 'default admin warning group', '2018-11-29 10:20:39',
  743. '2018-11-29 10:20:39');
  744. -- ----------------------------
  745. -- Records of t_ds_user
  746. -- ----------------------------
  747. INSERT INTO `t_ds_user`
  748. VALUES ('1', 'admin', '7ad2410b2f4c074479a8937a28a22b8f', '0', 'xxx@qq.com', '', '0', '2018-03-27 15:48:50',
  749. '2018-10-24 17:40:22', null, 1);
  750. -- ----------------------------
  751. -- Table structure for t_ds_plugin_define
  752. -- ----------------------------
  753. SET
  754. sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''));
  755. DROP TABLE IF EXISTS `t_ds_plugin_define`;
  756. CREATE TABLE `t_ds_plugin_define` (
  757. `id` int NOT NULL AUTO_INCREMENT,
  758. `plugin_name` varchar(100) NOT NULL COMMENT 'the name of plugin eg: email',
  759. `plugin_type` varchar(100) NOT NULL COMMENT 'plugin type . alert=alert plugin, job=job plugin',
  760. `plugin_params` text COMMENT 'plugin params',
  761. `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  762. `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  763. PRIMARY KEY (`id`),
  764. UNIQUE KEY `t_ds_plugin_define_UN` (`plugin_name`,`plugin_type`)
  765. ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
  766. -- ----------------------------
  767. -- Table structure for t_ds_alert_plugin_instance
  768. -- ----------------------------
  769. DROP TABLE IF EXISTS `t_ds_alert_plugin_instance`;
  770. CREATE TABLE `t_ds_alert_plugin_instance` (
  771. `id` int NOT NULL AUTO_INCREMENT,
  772. `plugin_define_id` int NOT NULL,
  773. `plugin_instance_params` text COMMENT 'plugin instance params. Also contain the params value which user input in web ui.',
  774. `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  775. `update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  776. `instance_name` varchar(200) DEFAULT NULL COMMENT 'alert instance name',
  777. PRIMARY KEY (`id`)
  778. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;