dolphinscheduler_mysql.sql 38 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850
  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=utf8mb4;
  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=utf8mb4;
  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=utf8mb4;
  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=utf8mb4;
  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=utf8mb4;
  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=utf8mb4;
  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=utf8mb4;
  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=utf8mb4;
  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=utf8mb4;
  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=utf8mb4;
  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=utf8mb4;
  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. `show_type` tinyint(4) DEFAULT NULL COMMENT 'send email type,0:TABLE,1:TEXT',
  257. `content` text COMMENT 'Message content (can be email, can be SMS. Mail is stored in JSON map, and SMS is string)',
  258. `alert_type` tinyint(4) DEFAULT NULL COMMENT '0:email,1:sms',
  259. `alert_status` tinyint(4) DEFAULT '0' COMMENT '0:wait running,1:success,2:failed',
  260. `log` text COMMENT 'log',
  261. `alertgroup_id` int(11) DEFAULT NULL COMMENT 'alert group id',
  262. `receivers` text COMMENT 'receivers',
  263. `receivers_cc` text COMMENT 'cc',
  264. `create_time` datetime DEFAULT NULL COMMENT 'create time',
  265. `update_time` datetime DEFAULT NULL COMMENT 'update time',
  266. PRIMARY KEY (`id`)
  267. ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
  268. -- ----------------------------
  269. -- Records of t_ds_alert
  270. -- ----------------------------
  271. -- ----------------------------
  272. -- Table structure for t_ds_alertgroup
  273. -- ----------------------------
  274. DROP TABLE IF EXISTS `t_ds_alertgroup`;
  275. CREATE TABLE `t_ds_alertgroup` (
  276. `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'key',
  277. `group_name` varchar(255) DEFAULT NULL COMMENT 'group name',
  278. `group_type` tinyint(4) DEFAULT NULL COMMENT 'Group type (message 0, SMS 1...)',
  279. `description` varchar(255) DEFAULT NULL,
  280. `create_time` datetime DEFAULT NULL COMMENT 'create time',
  281. `update_time` datetime DEFAULT NULL COMMENT 'update time',
  282. PRIMARY KEY (`id`)
  283. ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
  284. -- ----------------------------
  285. -- Records of t_ds_alertgroup
  286. -- ----------------------------
  287. -- ----------------------------
  288. -- Table structure for t_ds_command
  289. -- ----------------------------
  290. DROP TABLE IF EXISTS `t_ds_command`;
  291. CREATE TABLE `t_ds_command` (
  292. `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'key',
  293. `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',
  294. `process_definition_id` int(11) DEFAULT NULL COMMENT 'process definition id',
  295. `command_param` text COMMENT 'json command parameters',
  296. `task_depend_type` tinyint(4) DEFAULT NULL COMMENT 'Node dependency type: 0 current node, 1 forward, 2 backward',
  297. `failure_strategy` tinyint(4) DEFAULT '0' COMMENT 'Failed policy: 0 end, 1 continue',
  298. `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',
  299. `warning_group_id` int(11) DEFAULT NULL COMMENT 'warning group',
  300. `schedule_time` datetime DEFAULT NULL COMMENT 'schedule time',
  301. `start_time` datetime DEFAULT NULL COMMENT 'start time',
  302. `executor_id` int(11) DEFAULT NULL COMMENT 'executor id',
  303. `dependence` varchar(255) DEFAULT NULL COMMENT 'dependence',
  304. `update_time` datetime DEFAULT NULL COMMENT 'update time',
  305. `process_instance_priority` int(11) DEFAULT NULL COMMENT 'process instance priority: 0 Highest,1 High,2 Medium,3 Low,4 Lowest',
  306. `worker_group` varchar(64) COMMENT 'worker group',
  307. PRIMARY KEY (`id`)
  308. ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
  309. -- ----------------------------
  310. -- Records of t_ds_command
  311. -- ----------------------------
  312. -- ----------------------------
  313. -- Table structure for t_ds_datasource
  314. -- ----------------------------
  315. DROP TABLE IF EXISTS `t_ds_datasource`;
  316. CREATE TABLE `t_ds_datasource` (
  317. `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'key',
  318. `name` varchar(64) NOT NULL COMMENT 'data source name',
  319. `note` varchar(256) DEFAULT NULL COMMENT 'description',
  320. `type` tinyint(4) NOT NULL COMMENT 'data source type: 0:mysql,1:postgresql,2:hive,3:spark',
  321. `user_id` int(11) NOT NULL COMMENT 'the creator id',
  322. `connection_params` text NOT NULL COMMENT 'json connection params',
  323. `create_time` datetime NOT NULL COMMENT 'create time',
  324. `update_time` datetime DEFAULT NULL COMMENT 'update time',
  325. PRIMARY KEY (`id`)
  326. ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
  327. -- ----------------------------
  328. -- Records of t_ds_datasource
  329. -- ----------------------------
  330. -- ----------------------------
  331. -- Table structure for t_ds_error_command
  332. -- ----------------------------
  333. DROP TABLE IF EXISTS `t_ds_error_command`;
  334. CREATE TABLE `t_ds_error_command` (
  335. `id` int(11) NOT NULL COMMENT 'key',
  336. `command_type` tinyint(4) DEFAULT NULL COMMENT 'command type',
  337. `executor_id` int(11) DEFAULT NULL COMMENT 'executor id',
  338. `process_definition_id` int(11) DEFAULT NULL COMMENT 'process definition id',
  339. `command_param` text COMMENT 'json command parameters',
  340. `task_depend_type` tinyint(4) DEFAULT NULL COMMENT 'task depend type',
  341. `failure_strategy` tinyint(4) DEFAULT '0' COMMENT 'failure strategy',
  342. `warning_type` tinyint(4) DEFAULT '0' COMMENT 'warning type',
  343. `warning_group_id` int(11) DEFAULT NULL COMMENT 'warning group id',
  344. `schedule_time` datetime DEFAULT NULL COMMENT 'scheduler time',
  345. `start_time` datetime DEFAULT NULL COMMENT 'start time',
  346. `update_time` datetime DEFAULT NULL COMMENT 'update time',
  347. `dependence` text COMMENT 'dependence',
  348. `process_instance_priority` int(11) DEFAULT NULL COMMENT 'process instance priority, 0 Highest,1 High,2 Medium,3 Low,4 Lowest',
  349. `worker_group` varchar(64) COMMENT 'worker group',
  350. `message` text COMMENT 'message',
  351. PRIMARY KEY (`id`) USING BTREE
  352. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
  353. -- ----------------------------
  354. -- Records of t_ds_error_command
  355. -- ----------------------------
  356. -- ----------------------------
  357. -- Table structure for t_ds_process_definition
  358. -- ----------------------------
  359. DROP TABLE IF EXISTS `t_ds_process_definition`;
  360. CREATE TABLE `t_ds_process_definition` (
  361. `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'key',
  362. `name` varchar(255) DEFAULT NULL COMMENT 'process definition name',
  363. `version` int(11) DEFAULT NULL COMMENT 'process definition version',
  364. `release_state` tinyint(4) DEFAULT NULL COMMENT 'process definition release state:0:offline,1:online',
  365. `project_id` int(11) DEFAULT NULL COMMENT 'project id',
  366. `user_id` int(11) DEFAULT NULL COMMENT 'process definition creator id',
  367. `process_definition_json` longtext COMMENT 'process definition json content',
  368. `description` text,
  369. `global_params` text COMMENT 'global parameters',
  370. `flag` tinyint(4) DEFAULT NULL COMMENT '0 not available, 1 available',
  371. `locations` text COMMENT 'Node location information',
  372. `connects` text COMMENT 'Node connection information',
  373. `receivers` text COMMENT 'receivers',
  374. `receivers_cc` text COMMENT 'cc',
  375. `create_time` datetime DEFAULT NULL COMMENT 'create time',
  376. `timeout` int(11) DEFAULT '0' COMMENT 'time out',
  377. `tenant_id` int(11) NOT NULL DEFAULT '-1' COMMENT 'tenant id',
  378. `update_time` datetime DEFAULT NULL COMMENT 'update time',
  379. `modify_by` varchar(255) DEFAULT NULL,
  380. `resource_ids` varchar(255) DEFAULT NULL,
  381. PRIMARY KEY (`id`),
  382. UNIQUE KEY `process_definition_unique` (`name`,`project_id`),
  383. KEY `process_definition_index` (`project_id`,`id`) USING BTREE
  384. ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
  385. -- ----------------------------
  386. -- Records of t_ds_process_definition
  387. -- ----------------------------
  388. -- ----------------------------
  389. -- Table structure for t_ds_process_definition_version
  390. -- ----------------------------
  391. DROP TABLE IF EXISTS `t_ds_process_definition_version`;
  392. CREATE TABLE `t_ds_process_definition_version` (
  393. `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'key',
  394. `process_definition_id` int(11) NOT NULL COMMENT 'process definition id',
  395. `version` int(11) DEFAULT NULL COMMENT 'process definition version',
  396. `process_definition_json` longtext COMMENT 'process definition json content',
  397. `description` text,
  398. `global_params` text COMMENT 'global parameters',
  399. `locations` text COMMENT 'Node location information',
  400. `connects` text COMMENT 'Node connection information',
  401. `receivers` text COMMENT 'receivers',
  402. `receivers_cc` text COMMENT 'cc',
  403. `create_time` datetime DEFAULT NULL COMMENT 'create time',
  404. `timeout` int(11) DEFAULT '0' COMMENT 'time out',
  405. `resource_ids` varchar(255) DEFAULT NULL COMMENT 'resource ids',
  406. PRIMARY KEY (`id`),
  407. UNIQUE KEY `process_definition_id_and_version` (`process_definition_id`,`version`) USING BTREE,
  408. KEY `process_definition_index` (`id`) USING BTREE
  409. ) ENGINE=InnoDB AUTO_INCREMENT=84 DEFAULT CHARSET=utf8;
  410. -- ----------------------------
  411. -- Records of t_ds_process_definition
  412. -- ----------------------------
  413. -- ----------------------------
  414. -- Table structure for t_ds_process_instance
  415. -- ----------------------------
  416. DROP TABLE IF EXISTS `t_ds_process_instance`;
  417. CREATE TABLE `t_ds_process_instance` (
  418. `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'key',
  419. `name` varchar(255) DEFAULT NULL COMMENT 'process instance name',
  420. `process_definition_id` int(11) DEFAULT NULL COMMENT 'process definition id',
  421. `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',
  422. `recovery` tinyint(4) DEFAULT NULL COMMENT 'process instance failover flag:0:normal,1:failover instance',
  423. `start_time` datetime DEFAULT NULL COMMENT 'process instance start time',
  424. `end_time` datetime DEFAULT NULL COMMENT 'process instance end time',
  425. `run_times` int(11) DEFAULT NULL COMMENT 'process instance run times',
  426. `host` varchar(45) DEFAULT NULL COMMENT 'process instance host',
  427. `command_type` tinyint(4) DEFAULT NULL COMMENT 'command type',
  428. `command_param` text COMMENT 'json command parameters',
  429. `task_depend_type` tinyint(4) DEFAULT NULL COMMENT 'task depend type. 0: only current node,1:before the node,2:later nodes',
  430. `max_try_times` tinyint(4) DEFAULT '0' COMMENT 'max try times',
  431. `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',
  432. `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',
  433. `warning_group_id` int(11) DEFAULT NULL COMMENT 'warning group id',
  434. `schedule_time` datetime DEFAULT NULL COMMENT 'schedule time',
  435. `command_start_time` datetime DEFAULT NULL COMMENT 'command start time',
  436. `global_params` text COMMENT 'global parameters',
  437. `process_instance_json` longtext COMMENT 'process instance json(copy的process definition 的json)',
  438. `flag` tinyint(4) DEFAULT '1' COMMENT 'flag',
  439. `update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  440. `is_sub_process` int(11) DEFAULT '0' COMMENT 'flag, whether the process is sub process',
  441. `executor_id` int(11) NOT NULL COMMENT 'executor id',
  442. `locations` text COMMENT 'Node location information',
  443. `connects` text COMMENT 'Node connection information',
  444. `history_cmd` text COMMENT 'history commands of process instance operation',
  445. `dependence_schedule_times` text COMMENT 'depend schedule fire time',
  446. `process_instance_priority` int(11) DEFAULT NULL COMMENT 'process instance priority. 0 Highest,1 High,2 Medium,3 Low,4 Lowest',
  447. `worker_group` varchar(64) DEFAULT NULL COMMENT 'worker group id',
  448. `timeout` int(11) DEFAULT '0' COMMENT 'time out',
  449. `tenant_id` int(11) NOT NULL DEFAULT '-1' COMMENT 'tenant id',
  450. `var_pool` longtext COMMENT 'var_pool',
  451. PRIMARY KEY (`id`),
  452. KEY `process_instance_index` (`process_definition_id`,`id`) USING BTREE,
  453. KEY `start_time_index` (`start_time`) USING BTREE
  454. ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
  455. -- ----------------------------
  456. -- Records of t_ds_process_instance
  457. -- ----------------------------
  458. -- ----------------------------
  459. -- Table structure for t_ds_project
  460. -- ----------------------------
  461. DROP TABLE IF EXISTS `t_ds_project`;
  462. CREATE TABLE `t_ds_project` (
  463. `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'key',
  464. `name` varchar(100) DEFAULT NULL COMMENT 'project name',
  465. `description` varchar(200) DEFAULT NULL,
  466. `user_id` int(11) DEFAULT NULL COMMENT 'creator id',
  467. `flag` tinyint(4) DEFAULT '1' COMMENT '0 not available, 1 available',
  468. `create_time` datetime DEFAULT NULL COMMENT 'create time',
  469. `update_time` datetime DEFAULT NULL COMMENT 'update time',
  470. PRIMARY KEY (`id`),
  471. KEY `user_id_index` (`user_id`) USING BTREE
  472. ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
  473. -- ----------------------------
  474. -- Records of t_ds_project
  475. -- ----------------------------
  476. -- ----------------------------
  477. -- Table structure for t_ds_queue
  478. -- ----------------------------
  479. DROP TABLE IF EXISTS `t_ds_queue`;
  480. CREATE TABLE `t_ds_queue` (
  481. `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'key',
  482. `queue_name` varchar(64) DEFAULT NULL COMMENT 'queue name',
  483. `queue` varchar(64) DEFAULT NULL COMMENT 'yarn queue name',
  484. `create_time` datetime DEFAULT NULL COMMENT 'create time',
  485. `update_time` datetime DEFAULT NULL COMMENT 'update time',
  486. PRIMARY KEY (`id`)
  487. ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
  488. -- ----------------------------
  489. -- Records of t_ds_queue
  490. -- ----------------------------
  491. INSERT INTO `t_ds_queue` VALUES ('1', 'default', 'default', null, null);
  492. -- ----------------------------
  493. -- Table structure for t_ds_relation_datasource_user
  494. -- ----------------------------
  495. DROP TABLE IF EXISTS `t_ds_relation_datasource_user`;
  496. CREATE TABLE `t_ds_relation_datasource_user` (
  497. `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'key',
  498. `user_id` int(11) NOT NULL COMMENT 'user id',
  499. `datasource_id` int(11) DEFAULT NULL COMMENT 'data source id',
  500. `perm` int(11) DEFAULT '1' COMMENT 'limits of authority',
  501. `create_time` datetime DEFAULT NULL COMMENT 'create time',
  502. `update_time` datetime DEFAULT NULL COMMENT 'update time',
  503. PRIMARY KEY (`id`)
  504. ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
  505. -- ----------------------------
  506. -- Records of t_ds_relation_datasource_user
  507. -- ----------------------------
  508. -- ----------------------------
  509. -- Table structure for t_ds_relation_process_instance
  510. -- ----------------------------
  511. DROP TABLE IF EXISTS `t_ds_relation_process_instance`;
  512. CREATE TABLE `t_ds_relation_process_instance` (
  513. `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'key',
  514. `parent_process_instance_id` int(11) DEFAULT NULL COMMENT 'parent process instance id',
  515. `parent_task_instance_id` int(11) DEFAULT NULL COMMENT 'parent process instance id',
  516. `process_instance_id` int(11) DEFAULT NULL COMMENT 'child process instance id',
  517. PRIMARY KEY (`id`)
  518. ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
  519. -- ----------------------------
  520. -- Records of t_ds_relation_process_instance
  521. -- ----------------------------
  522. -- ----------------------------
  523. -- Table structure for t_ds_relation_project_user
  524. -- ----------------------------
  525. DROP TABLE IF EXISTS `t_ds_relation_project_user`;
  526. CREATE TABLE `t_ds_relation_project_user` (
  527. `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'key',
  528. `user_id` int(11) NOT NULL COMMENT 'user id',
  529. `project_id` int(11) DEFAULT NULL COMMENT 'project id',
  530. `perm` int(11) DEFAULT '1' COMMENT 'limits of authority',
  531. `create_time` datetime DEFAULT NULL COMMENT 'create time',
  532. `update_time` datetime DEFAULT NULL COMMENT 'update time',
  533. PRIMARY KEY (`id`),
  534. KEY `user_id_index` (`user_id`) USING BTREE
  535. ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
  536. -- ----------------------------
  537. -- Records of t_ds_relation_project_user
  538. -- ----------------------------
  539. -- ----------------------------
  540. -- Table structure for t_ds_relation_resources_user
  541. -- ----------------------------
  542. DROP TABLE IF EXISTS `t_ds_relation_resources_user`;
  543. CREATE TABLE `t_ds_relation_resources_user` (
  544. `id` int(11) NOT NULL AUTO_INCREMENT,
  545. `user_id` int(11) NOT NULL COMMENT 'user id',
  546. `resources_id` int(11) DEFAULT NULL COMMENT 'resource id',
  547. `perm` int(11) DEFAULT '1' COMMENT 'limits of authority',
  548. `create_time` datetime DEFAULT NULL COMMENT 'create time',
  549. `update_time` datetime DEFAULT NULL COMMENT 'update time',
  550. PRIMARY KEY (`id`)
  551. ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
  552. -- ----------------------------
  553. -- Records of t_ds_relation_resources_user
  554. -- ----------------------------
  555. -- ----------------------------
  556. -- Table structure for t_ds_relation_udfs_user
  557. -- ----------------------------
  558. DROP TABLE IF EXISTS `t_ds_relation_udfs_user`;
  559. CREATE TABLE `t_ds_relation_udfs_user` (
  560. `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'key',
  561. `user_id` int(11) NOT NULL COMMENT 'userid',
  562. `udf_id` int(11) DEFAULT NULL COMMENT 'udf id',
  563. `perm` int(11) DEFAULT '1' COMMENT 'limits of authority',
  564. `create_time` datetime DEFAULT NULL COMMENT 'create time',
  565. `update_time` datetime DEFAULT NULL COMMENT 'update time',
  566. PRIMARY KEY (`id`)
  567. ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
  568. -- ----------------------------
  569. -- Records of t_ds_relation_udfs_user
  570. -- ----------------------------
  571. -- ----------------------------
  572. -- Table structure for t_ds_relation_user_alertgroup
  573. -- ----------------------------
  574. DROP TABLE IF EXISTS `t_ds_relation_user_alertgroup`;
  575. CREATE TABLE `t_ds_relation_user_alertgroup` (
  576. `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'key',
  577. `alertgroup_id` int(11) DEFAULT NULL COMMENT 'alert group id',
  578. `user_id` int(11) DEFAULT NULL COMMENT 'user id',
  579. `create_time` datetime DEFAULT NULL COMMENT 'create time',
  580. `update_time` datetime DEFAULT NULL COMMENT 'update time',
  581. PRIMARY KEY (`id`)
  582. ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
  583. -- ----------------------------
  584. -- Records of t_ds_relation_user_alertgroup
  585. -- ----------------------------
  586. -- ----------------------------
  587. -- Table structure for t_ds_resources
  588. -- ----------------------------
  589. DROP TABLE IF EXISTS `t_ds_resources`;
  590. CREATE TABLE `t_ds_resources` (
  591. `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'key',
  592. `alias` varchar(64) DEFAULT NULL COMMENT 'alias',
  593. `file_name` varchar(64) DEFAULT NULL COMMENT 'file name',
  594. `description` varchar(256) DEFAULT NULL,
  595. `user_id` int(11) DEFAULT NULL COMMENT 'user id',
  596. `type` tinyint(4) DEFAULT NULL COMMENT 'resource type,0:FILE,1:UDF',
  597. `size` bigint(20) DEFAULT NULL COMMENT 'resource size',
  598. `create_time` datetime DEFAULT NULL COMMENT 'create time',
  599. `update_time` datetime DEFAULT NULL COMMENT 'update time',
  600. `pid` int(11) DEFAULT NULL,
  601. `full_name` varchar(64) DEFAULT NULL,
  602. `is_directory` tinyint(4) DEFAULT NULL,
  603. PRIMARY KEY (`id`),
  604. UNIQUE KEY `t_ds_resources_un` (`full_name`,`type`)
  605. ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
  606. -- ----------------------------
  607. -- Records of t_ds_resources
  608. -- ----------------------------
  609. -- ----------------------------
  610. -- Table structure for t_ds_schedules
  611. -- ----------------------------
  612. DROP TABLE IF EXISTS `t_ds_schedules`;
  613. CREATE TABLE `t_ds_schedules` (
  614. `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'key',
  615. `process_definition_id` int(11) NOT NULL COMMENT 'process definition id',
  616. `start_time` datetime NOT NULL COMMENT 'start time',
  617. `end_time` datetime NOT NULL COMMENT 'end time',
  618. `crontab` varchar(256) NOT NULL COMMENT 'crontab description',
  619. `failure_strategy` tinyint(4) NOT NULL COMMENT 'failure strategy. 0:end,1:continue',
  620. `user_id` int(11) NOT NULL COMMENT 'user id',
  621. `release_state` tinyint(4) NOT NULL COMMENT 'release state. 0:offline,1:online ',
  622. `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',
  623. `warning_group_id` int(11) DEFAULT NULL COMMENT 'alert group id',
  624. `process_instance_priority` int(11) DEFAULT NULL COMMENT 'process instance priority:0 Highest,1 High,2 Medium,3 Low,4 Lowest',
  625. `worker_group` varchar(256) DEFAULT '' COMMENT 'worker group id',
  626. `create_time` datetime NOT NULL COMMENT 'create time',
  627. `update_time` datetime NOT NULL COMMENT 'update time',
  628. PRIMARY KEY (`id`)
  629. ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
  630. -- ----------------------------
  631. -- Records of t_ds_schedules
  632. -- ----------------------------
  633. -- ----------------------------
  634. -- Table structure for t_ds_session
  635. -- ----------------------------
  636. DROP TABLE IF EXISTS `t_ds_session`;
  637. CREATE TABLE `t_ds_session` (
  638. `id` varchar(64) NOT NULL COMMENT 'key',
  639. `user_id` int(11) DEFAULT NULL COMMENT 'user id',
  640. `ip` varchar(45) DEFAULT NULL COMMENT 'ip',
  641. `last_login_time` datetime DEFAULT NULL COMMENT 'last login time',
  642. PRIMARY KEY (`id`)
  643. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  644. -- ----------------------------
  645. -- Records of t_ds_session
  646. -- ----------------------------
  647. -- ----------------------------
  648. -- Table structure for t_ds_task_instance
  649. -- ----------------------------
  650. DROP TABLE IF EXISTS `t_ds_task_instance`;
  651. CREATE TABLE `t_ds_task_instance` (
  652. `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'key',
  653. `name` varchar(255) DEFAULT NULL COMMENT 'task name',
  654. `task_type` varchar(64) DEFAULT NULL COMMENT 'task type',
  655. `process_definition_id` int(11) DEFAULT NULL COMMENT 'process definition id',
  656. `process_instance_id` int(11) DEFAULT NULL COMMENT 'process instance id',
  657. `task_json` longtext COMMENT 'task content json',
  658. `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',
  659. `submit_time` datetime DEFAULT NULL COMMENT 'task submit time',
  660. `start_time` datetime DEFAULT NULL COMMENT 'task start time',
  661. `end_time` datetime DEFAULT NULL COMMENT 'task end time',
  662. `host` varchar(45) DEFAULT NULL COMMENT 'host of task running on',
  663. `execute_path` varchar(200) DEFAULT NULL COMMENT 'task execute path in the host',
  664. `log_path` varchar(200) DEFAULT NULL COMMENT 'task log path',
  665. `alert_flag` tinyint(4) DEFAULT NULL COMMENT 'whether alert',
  666. `retry_times` int(4) DEFAULT '0' COMMENT 'task retry times',
  667. `pid` int(4) DEFAULT NULL COMMENT 'pid of task',
  668. `app_link` varchar(255) DEFAULT NULL COMMENT 'yarn app id',
  669. `flag` tinyint(4) DEFAULT '1' COMMENT '0 not available, 1 available',
  670. `retry_interval` int(4) DEFAULT NULL COMMENT 'retry interval when task failed ',
  671. `max_retry_times` int(2) DEFAULT NULL COMMENT 'max retry times',
  672. `task_instance_priority` int(11) DEFAULT NULL COMMENT 'task instance priority:0 Highest,1 High,2 Medium,3 Low,4 Lowest',
  673. `worker_group` varchar(64) DEFAULT NULL COMMENT 'worker group id',
  674. `executor_id` int(11) DEFAULT NULL,
  675. `first_submit_time` datetime DEFAULT NULL COMMENT 'task first submit time',
  676. `delay_time` int(4) DEFAULT '0' COMMENT 'task delay execution time',
  677. `var_pool` longtext COMMENT 'var_pool',
  678. PRIMARY KEY (`id`),
  679. KEY `process_instance_id` (`process_instance_id`) USING BTREE,
  680. KEY `task_instance_index` (`process_definition_id`,`process_instance_id`) USING BTREE,
  681. CONSTRAINT `foreign_key_instance_id` FOREIGN KEY (`process_instance_id`) REFERENCES `t_ds_process_instance` (`id`) ON DELETE CASCADE
  682. ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
  683. -- ----------------------------
  684. -- Records of t_ds_task_instance
  685. -- ----------------------------
  686. -- ----------------------------
  687. -- Table structure for t_ds_tenant
  688. -- ----------------------------
  689. DROP TABLE IF EXISTS `t_ds_tenant`;
  690. CREATE TABLE `t_ds_tenant` (
  691. `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'key',
  692. `tenant_code` varchar(64) DEFAULT NULL COMMENT 'tenant code',
  693. `tenant_name` varchar(64) DEFAULT NULL COMMENT 'tenant name',
  694. `description` varchar(256) DEFAULT NULL,
  695. `queue_id` int(11) DEFAULT NULL COMMENT 'queue id',
  696. `create_time` datetime DEFAULT NULL COMMENT 'create time',
  697. `update_time` datetime DEFAULT NULL COMMENT 'update time',
  698. PRIMARY KEY (`id`)
  699. ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
  700. -- ----------------------------
  701. -- Records of t_ds_tenant
  702. -- ----------------------------
  703. -- ----------------------------
  704. -- Table structure for t_ds_udfs
  705. -- ----------------------------
  706. DROP TABLE IF EXISTS `t_ds_udfs`;
  707. CREATE TABLE `t_ds_udfs` (
  708. `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'key',
  709. `user_id` int(11) NOT NULL COMMENT 'user id',
  710. `func_name` varchar(100) NOT NULL COMMENT 'UDF function name',
  711. `class_name` varchar(255) NOT NULL COMMENT 'class of udf',
  712. `type` tinyint(4) NOT NULL COMMENT 'Udf function type',
  713. `arg_types` varchar(255) DEFAULT NULL COMMENT 'arguments types',
  714. `database` varchar(255) DEFAULT NULL COMMENT 'data base',
  715. `description` varchar(255) DEFAULT NULL,
  716. `resource_id` int(11) NOT NULL COMMENT 'resource id',
  717. `resource_name` varchar(255) NOT NULL COMMENT 'resource name',
  718. `create_time` datetime NOT NULL COMMENT 'create time',
  719. `update_time` datetime NOT NULL COMMENT 'update time',
  720. PRIMARY KEY (`id`)
  721. ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
  722. -- ----------------------------
  723. -- Records of t_ds_udfs
  724. -- ----------------------------
  725. -- ----------------------------
  726. -- Table structure for t_ds_user
  727. -- ----------------------------
  728. DROP TABLE IF EXISTS `t_ds_user`;
  729. CREATE TABLE `t_ds_user` (
  730. `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'user id',
  731. `user_name` varchar(64) DEFAULT NULL COMMENT 'user name',
  732. `user_password` varchar(64) DEFAULT NULL COMMENT 'user password',
  733. `user_type` tinyint(4) DEFAULT NULL COMMENT 'user type, 0:administrator,1:ordinary user',
  734. `email` varchar(64) DEFAULT NULL COMMENT 'email',
  735. `phone` varchar(11) DEFAULT NULL COMMENT 'phone',
  736. `tenant_id` int(11) DEFAULT NULL COMMENT 'tenant id',
  737. `create_time` datetime DEFAULT NULL COMMENT 'create time',
  738. `update_time` datetime DEFAULT NULL COMMENT 'update time',
  739. `queue` varchar(64) DEFAULT NULL COMMENT 'queue',
  740. `state` int(1) DEFAULT 1 COMMENT 'state 0:disable 1:enable',
  741. PRIMARY KEY (`id`),
  742. UNIQUE KEY `user_name_unique` (`user_name`)
  743. ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
  744. -- ----------------------------
  745. -- Records of t_ds_user
  746. -- ----------------------------
  747. -- ----------------------------
  748. -- Table structure for t_ds_version
  749. -- ----------------------------
  750. DROP TABLE IF EXISTS `t_ds_version`;
  751. CREATE TABLE `t_ds_version` (
  752. `id` int(11) NOT NULL AUTO_INCREMENT,
  753. `version` varchar(200) NOT NULL,
  754. PRIMARY KEY (`id`),
  755. UNIQUE KEY `version_UNIQUE` (`version`)
  756. ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COMMENT='version';
  757. -- ----------------------------
  758. -- Records of t_ds_version
  759. -- ----------------------------
  760. INSERT INTO `t_ds_version` VALUES ('1', '1.3.0');
  761. -- ----------------------------
  762. -- Records of t_ds_alertgroup
  763. -- ----------------------------
  764. INSERT INTO `t_ds_alertgroup` VALUES ('1', 'default admin warning group', '0', 'default admin warning group', '2018-11-29 10:20:39', '2018-11-29 10:20:39');
  765. -- ----------------------------
  766. -- Records of t_ds_relation_user_alertgroup
  767. -- ----------------------------
  768. INSERT INTO `t_ds_relation_user_alertgroup` VALUES ('1', '1', '1', '2018-11-29 10:22:33', '2018-11-29 10:22:33');
  769. -- ----------------------------
  770. -- Records of t_ds_user
  771. -- ----------------------------
  772. INSERT INTO `t_ds_user` VALUES ('1', 'admin', '7ad2410b2f4c074479a8937a28a22b8f', '0', 'xxx@qq.com', '', '0', '2018-03-27 15:48:50', '2018-10-24 17:40:22', null, 1);