dolphinscheduler_mysql.sql 36 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817
  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_instance
  390. -- ----------------------------
  391. DROP TABLE IF EXISTS `t_ds_process_instance`;
  392. CREATE TABLE `t_ds_process_instance` (
  393. `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'key',
  394. `name` varchar(255) DEFAULT NULL COMMENT 'process instance name',
  395. `process_definition_id` int(11) DEFAULT NULL COMMENT 'process definition id',
  396. `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',
  397. `recovery` tinyint(4) DEFAULT NULL COMMENT 'process instance failover flag:0:normal,1:failover instance',
  398. `start_time` datetime DEFAULT NULL COMMENT 'process instance start time',
  399. `end_time` datetime DEFAULT NULL COMMENT 'process instance end time',
  400. `run_times` int(11) DEFAULT NULL COMMENT 'process instance run times',
  401. `host` varchar(45) DEFAULT NULL COMMENT 'process instance host',
  402. `command_type` tinyint(4) DEFAULT NULL COMMENT 'command type',
  403. `command_param` text COMMENT 'json command parameters',
  404. `task_depend_type` tinyint(4) DEFAULT NULL COMMENT 'task depend type. 0: only current node,1:before the node,2:later nodes',
  405. `max_try_times` tinyint(4) DEFAULT '0' COMMENT 'max try times',
  406. `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',
  407. `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',
  408. `warning_group_id` int(11) DEFAULT NULL COMMENT 'warning group id',
  409. `schedule_time` datetime DEFAULT NULL COMMENT 'schedule time',
  410. `command_start_time` datetime DEFAULT NULL COMMENT 'command start time',
  411. `global_params` text COMMENT 'global parameters',
  412. `process_instance_json` longtext COMMENT 'process instance json(copy的process definition 的json)',
  413. `flag` tinyint(4) DEFAULT '1' COMMENT 'flag',
  414. `update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  415. `is_sub_process` int(11) DEFAULT '0' COMMENT 'flag, whether the process is sub process',
  416. `executor_id` int(11) NOT NULL COMMENT 'executor id',
  417. `locations` text COMMENT 'Node location information',
  418. `connects` text COMMENT 'Node connection information',
  419. `history_cmd` text COMMENT 'history commands of process instance operation',
  420. `dependence_schedule_times` text COMMENT 'depend schedule fire time',
  421. `process_instance_priority` int(11) DEFAULT NULL COMMENT 'process instance priority. 0 Highest,1 High,2 Medium,3 Low,4 Lowest',
  422. `worker_group` varchar(64) DEFAULT NULL COMMENT 'worker group id',
  423. `timeout` int(11) DEFAULT '0' COMMENT 'time out',
  424. `tenant_id` int(11) NOT NULL DEFAULT '-1' COMMENT 'tenant id',
  425. PRIMARY KEY (`id`),
  426. KEY `process_instance_index` (`process_definition_id`,`id`) USING BTREE,
  427. KEY `start_time_index` (`start_time`) USING BTREE
  428. ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
  429. -- ----------------------------
  430. -- Records of t_ds_process_instance
  431. -- ----------------------------
  432. -- ----------------------------
  433. -- Table structure for t_ds_project
  434. -- ----------------------------
  435. DROP TABLE IF EXISTS `t_ds_project`;
  436. CREATE TABLE `t_ds_project` (
  437. `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'key',
  438. `name` varchar(100) DEFAULT NULL COMMENT 'project name',
  439. `description` varchar(200) DEFAULT NULL,
  440. `user_id` int(11) DEFAULT NULL COMMENT 'creator id',
  441. `flag` tinyint(4) DEFAULT '1' COMMENT '0 not available, 1 available',
  442. `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT 'create time',
  443. `update_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT 'update time',
  444. PRIMARY KEY (`id`),
  445. KEY `user_id_index` (`user_id`) USING BTREE
  446. ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
  447. -- ----------------------------
  448. -- Records of t_ds_project
  449. -- ----------------------------
  450. -- ----------------------------
  451. -- Table structure for t_ds_queue
  452. -- ----------------------------
  453. DROP TABLE IF EXISTS `t_ds_queue`;
  454. CREATE TABLE `t_ds_queue` (
  455. `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'key',
  456. `queue_name` varchar(64) DEFAULT NULL COMMENT 'queue name',
  457. `queue` varchar(64) DEFAULT NULL COMMENT 'yarn queue name',
  458. `create_time` datetime DEFAULT NULL COMMENT 'create time',
  459. `update_time` datetime DEFAULT NULL COMMENT 'update time',
  460. PRIMARY KEY (`id`)
  461. ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
  462. -- ----------------------------
  463. -- Records of t_ds_queue
  464. -- ----------------------------
  465. INSERT INTO `t_ds_queue` VALUES ('1', 'default', 'default', null, null);
  466. -- ----------------------------
  467. -- Table structure for t_ds_relation_datasource_user
  468. -- ----------------------------
  469. DROP TABLE IF EXISTS `t_ds_relation_datasource_user`;
  470. CREATE TABLE `t_ds_relation_datasource_user` (
  471. `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'key',
  472. `user_id` int(11) NOT NULL COMMENT 'user id',
  473. `datasource_id` int(11) DEFAULT NULL COMMENT 'data source id',
  474. `perm` int(11) DEFAULT '1' COMMENT 'limits of authority',
  475. `create_time` datetime DEFAULT NULL COMMENT 'create time',
  476. `update_time` datetime DEFAULT NULL COMMENT 'update time',
  477. PRIMARY KEY (`id`)
  478. ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
  479. -- ----------------------------
  480. -- Records of t_ds_relation_datasource_user
  481. -- ----------------------------
  482. -- ----------------------------
  483. -- Table structure for t_ds_relation_process_instance
  484. -- ----------------------------
  485. DROP TABLE IF EXISTS `t_ds_relation_process_instance`;
  486. CREATE TABLE `t_ds_relation_process_instance` (
  487. `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'key',
  488. `parent_process_instance_id` int(11) DEFAULT NULL COMMENT 'parent process instance id',
  489. `parent_task_instance_id` int(11) DEFAULT NULL COMMENT 'parent process instance id',
  490. `process_instance_id` int(11) DEFAULT NULL COMMENT 'child process instance id',
  491. PRIMARY KEY (`id`)
  492. ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
  493. -- ----------------------------
  494. -- Records of t_ds_relation_process_instance
  495. -- ----------------------------
  496. -- ----------------------------
  497. -- Table structure for t_ds_relation_project_user
  498. -- ----------------------------
  499. DROP TABLE IF EXISTS `t_ds_relation_project_user`;
  500. CREATE TABLE `t_ds_relation_project_user` (
  501. `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'key',
  502. `user_id` int(11) NOT NULL COMMENT 'user id',
  503. `project_id` int(11) DEFAULT NULL COMMENT 'project id',
  504. `perm` int(11) DEFAULT '1' COMMENT 'limits of authority',
  505. `create_time` datetime DEFAULT NULL COMMENT 'create time',
  506. `update_time` datetime DEFAULT NULL COMMENT 'update time',
  507. PRIMARY KEY (`id`),
  508. KEY `user_id_index` (`user_id`) USING BTREE
  509. ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
  510. -- ----------------------------
  511. -- Records of t_ds_relation_project_user
  512. -- ----------------------------
  513. -- ----------------------------
  514. -- Table structure for t_ds_relation_resources_user
  515. -- ----------------------------
  516. DROP TABLE IF EXISTS `t_ds_relation_resources_user`;
  517. CREATE TABLE `t_ds_relation_resources_user` (
  518. `id` int(11) NOT NULL AUTO_INCREMENT,
  519. `user_id` int(11) NOT NULL COMMENT 'user id',
  520. `resources_id` int(11) DEFAULT NULL COMMENT 'resource id',
  521. `perm` int(11) DEFAULT '1' COMMENT 'limits of authority',
  522. `create_time` datetime DEFAULT NULL COMMENT 'create time',
  523. `update_time` datetime DEFAULT NULL COMMENT 'update time',
  524. PRIMARY KEY (`id`)
  525. ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
  526. -- ----------------------------
  527. -- Records of t_ds_relation_resources_user
  528. -- ----------------------------
  529. -- ----------------------------
  530. -- Table structure for t_ds_relation_udfs_user
  531. -- ----------------------------
  532. DROP TABLE IF EXISTS `t_ds_relation_udfs_user`;
  533. CREATE TABLE `t_ds_relation_udfs_user` (
  534. `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'key',
  535. `user_id` int(11) NOT NULL COMMENT 'userid',
  536. `udf_id` int(11) DEFAULT NULL COMMENT 'udf id',
  537. `perm` int(11) DEFAULT '1' COMMENT 'limits of authority',
  538. `create_time` datetime DEFAULT NULL COMMENT 'create time',
  539. `update_time` datetime DEFAULT NULL COMMENT 'update time',
  540. PRIMARY KEY (`id`)
  541. ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
  542. -- ----------------------------
  543. -- Records of t_ds_relation_udfs_user
  544. -- ----------------------------
  545. -- ----------------------------
  546. -- Table structure for t_ds_relation_user_alertgroup
  547. -- ----------------------------
  548. DROP TABLE IF EXISTS `t_ds_relation_user_alertgroup`;
  549. CREATE TABLE `t_ds_relation_user_alertgroup` (
  550. `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'key',
  551. `alertgroup_id` int(11) DEFAULT NULL COMMENT 'alert group id',
  552. `user_id` int(11) DEFAULT NULL COMMENT 'user id',
  553. `create_time` datetime DEFAULT NULL COMMENT 'create time',
  554. `update_time` datetime DEFAULT NULL COMMENT 'update time',
  555. PRIMARY KEY (`id`)
  556. ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
  557. -- ----------------------------
  558. -- Records of t_ds_relation_user_alertgroup
  559. -- ----------------------------
  560. -- ----------------------------
  561. -- Table structure for t_ds_resources
  562. -- ----------------------------
  563. DROP TABLE IF EXISTS `t_ds_resources`;
  564. CREATE TABLE `t_ds_resources` (
  565. `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'key',
  566. `alias` varchar(64) DEFAULT NULL COMMENT 'alias',
  567. `file_name` varchar(64) DEFAULT NULL COMMENT 'file name',
  568. `description` varchar(256) DEFAULT NULL,
  569. `user_id` int(11) DEFAULT NULL COMMENT 'user id',
  570. `type` tinyint(4) DEFAULT NULL COMMENT 'resource type,0:FILE,1:UDF',
  571. `size` bigint(20) DEFAULT NULL COMMENT 'resource size',
  572. `create_time` datetime DEFAULT NULL COMMENT 'create time',
  573. `update_time` datetime DEFAULT NULL COMMENT 'update time',
  574. `pid` int(11) DEFAULT NULL,
  575. `full_name` varchar(64) DEFAULT NULL,
  576. `is_directory` tinyint(4) DEFAULT NULL,
  577. PRIMARY KEY (`id`)
  578. ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
  579. -- ----------------------------
  580. -- Records of t_ds_resources
  581. -- ----------------------------
  582. -- ----------------------------
  583. -- Table structure for t_ds_schedules
  584. -- ----------------------------
  585. DROP TABLE IF EXISTS `t_ds_schedules`;
  586. CREATE TABLE `t_ds_schedules` (
  587. `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'key',
  588. `process_definition_id` int(11) NOT NULL COMMENT 'process definition id',
  589. `start_time` datetime NOT NULL COMMENT 'start time',
  590. `end_time` datetime NOT NULL COMMENT 'end time',
  591. `crontab` varchar(256) NOT NULL COMMENT 'crontab description',
  592. `failure_strategy` tinyint(4) NOT NULL COMMENT 'failure strategy. 0:end,1:continue',
  593. `user_id` int(11) NOT NULL COMMENT 'user id',
  594. `release_state` tinyint(4) NOT NULL COMMENT 'release state. 0:offline,1:online ',
  595. `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',
  596. `warning_group_id` int(11) DEFAULT NULL COMMENT 'alert group id',
  597. `process_instance_priority` int(11) DEFAULT NULL COMMENT 'process instance priority:0 Highest,1 High,2 Medium,3 Low,4 Lowest',
  598. `worker_group` varchar(256) DEFAULT '' COMMENT 'worker group id',
  599. `create_time` datetime NOT NULL COMMENT 'create time',
  600. `update_time` datetime NOT NULL COMMENT 'update time',
  601. PRIMARY KEY (`id`)
  602. ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
  603. -- ----------------------------
  604. -- Records of t_ds_schedules
  605. -- ----------------------------
  606. -- ----------------------------
  607. -- Table structure for t_ds_session
  608. -- ----------------------------
  609. DROP TABLE IF EXISTS `t_ds_session`;
  610. CREATE TABLE `t_ds_session` (
  611. `id` varchar(64) NOT NULL COMMENT 'key',
  612. `user_id` int(11) DEFAULT NULL COMMENT 'user id',
  613. `ip` varchar(45) DEFAULT NULL COMMENT 'ip',
  614. `last_login_time` datetime DEFAULT NULL COMMENT 'last login time',
  615. PRIMARY KEY (`id`)
  616. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  617. -- ----------------------------
  618. -- Records of t_ds_session
  619. -- ----------------------------
  620. -- ----------------------------
  621. -- Table structure for t_ds_task_instance
  622. -- ----------------------------
  623. DROP TABLE IF EXISTS `t_ds_task_instance`;
  624. CREATE TABLE `t_ds_task_instance` (
  625. `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'key',
  626. `name` varchar(255) DEFAULT NULL COMMENT 'task name',
  627. `task_type` varchar(64) DEFAULT NULL COMMENT 'task type',
  628. `process_definition_id` int(11) DEFAULT NULL COMMENT 'process definition id',
  629. `process_instance_id` int(11) DEFAULT NULL COMMENT 'process instance id',
  630. `task_json` longtext COMMENT 'task content json',
  631. `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',
  632. `submit_time` datetime DEFAULT NULL COMMENT 'task submit time',
  633. `start_time` datetime DEFAULT NULL COMMENT 'task start time',
  634. `end_time` datetime DEFAULT NULL COMMENT 'task end time',
  635. `host` varchar(45) DEFAULT NULL COMMENT 'host of task running on',
  636. `execute_path` varchar(200) DEFAULT NULL COMMENT 'task execute path in the host',
  637. `log_path` varchar(200) DEFAULT NULL COMMENT 'task log path',
  638. `alert_flag` tinyint(4) DEFAULT NULL COMMENT 'whether alert',
  639. `retry_times` int(4) DEFAULT '0' COMMENT 'task retry times',
  640. `pid` int(4) DEFAULT NULL COMMENT 'pid of task',
  641. `app_link` varchar(255) DEFAULT NULL COMMENT 'yarn app id',
  642. `flag` tinyint(4) DEFAULT '1' COMMENT '0 not available, 1 available',
  643. `retry_interval` int(4) DEFAULT NULL COMMENT 'retry interval when task failed ',
  644. `max_retry_times` int(2) DEFAULT NULL COMMENT 'max retry times',
  645. `task_instance_priority` int(11) DEFAULT NULL COMMENT 'task instance priority:0 Highest,1 High,2 Medium,3 Low,4 Lowest',
  646. `worker_group` varchar(64) DEFAULT NULL COMMENT 'worker group id',
  647. `executor_id` int(11) DEFAULT NULL,
  648. PRIMARY KEY (`id`),
  649. KEY `process_instance_id` (`process_instance_id`) USING BTREE,
  650. KEY `task_instance_index` (`process_definition_id`,`process_instance_id`) USING BTREE,
  651. CONSTRAINT `foreign_key_instance_id` FOREIGN KEY (`process_instance_id`) REFERENCES `t_ds_process_instance` (`id`) ON DELETE CASCADE
  652. ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
  653. -- ----------------------------
  654. -- Records of t_ds_task_instance
  655. -- ----------------------------
  656. -- ----------------------------
  657. -- Table structure for t_ds_tenant
  658. -- ----------------------------
  659. DROP TABLE IF EXISTS `t_ds_tenant`;
  660. CREATE TABLE `t_ds_tenant` (
  661. `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'key',
  662. `tenant_code` varchar(64) DEFAULT NULL COMMENT 'tenant code',
  663. `tenant_name` varchar(64) DEFAULT NULL COMMENT 'tenant name',
  664. `description` varchar(256) DEFAULT NULL,
  665. `queue_id` int(11) DEFAULT NULL COMMENT 'queue id',
  666. `create_time` datetime DEFAULT NULL COMMENT 'create time',
  667. `update_time` datetime DEFAULT NULL COMMENT 'update time',
  668. PRIMARY KEY (`id`)
  669. ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
  670. -- ----------------------------
  671. -- Records of t_ds_tenant
  672. -- ----------------------------
  673. -- ----------------------------
  674. -- Table structure for t_ds_udfs
  675. -- ----------------------------
  676. DROP TABLE IF EXISTS `t_ds_udfs`;
  677. CREATE TABLE `t_ds_udfs` (
  678. `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'key',
  679. `user_id` int(11) NOT NULL COMMENT 'user id',
  680. `func_name` varchar(100) NOT NULL COMMENT 'UDF function name',
  681. `class_name` varchar(255) NOT NULL COMMENT 'class of udf',
  682. `type` tinyint(4) NOT NULL COMMENT 'Udf function type',
  683. `arg_types` varchar(255) DEFAULT NULL COMMENT 'arguments types',
  684. `database` varchar(255) DEFAULT NULL COMMENT 'data base',
  685. `description` varchar(255) DEFAULT NULL,
  686. `resource_id` int(11) NOT NULL COMMENT 'resource id',
  687. `resource_name` varchar(255) NOT NULL COMMENT 'resource name',
  688. `create_time` datetime NOT NULL COMMENT 'create time',
  689. `update_time` datetime NOT NULL COMMENT 'update time',
  690. PRIMARY KEY (`id`)
  691. ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
  692. -- ----------------------------
  693. -- Records of t_ds_udfs
  694. -- ----------------------------
  695. -- ----------------------------
  696. -- Table structure for t_ds_user
  697. -- ----------------------------
  698. DROP TABLE IF EXISTS `t_ds_user`;
  699. CREATE TABLE `t_ds_user` (
  700. `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'user id',
  701. `user_name` varchar(64) DEFAULT NULL COMMENT 'user name',
  702. `user_password` varchar(64) DEFAULT NULL COMMENT 'user password',
  703. `user_type` tinyint(4) DEFAULT NULL COMMENT 'user type, 0:administrator,1:ordinary user',
  704. `email` varchar(64) DEFAULT NULL COMMENT 'email',
  705. `phone` varchar(11) DEFAULT NULL COMMENT 'phone',
  706. `tenant_id` int(11) DEFAULT NULL COMMENT 'tenant id',
  707. `create_time` datetime DEFAULT NULL COMMENT 'create time',
  708. `update_time` datetime DEFAULT NULL COMMENT 'update time',
  709. `queue` varchar(64) DEFAULT NULL COMMENT 'queue',
  710. PRIMARY KEY (`id`),
  711. UNIQUE KEY `user_name_unique` (`user_name`)
  712. ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
  713. -- ----------------------------
  714. -- Records of t_ds_user
  715. -- ----------------------------
  716. -- ----------------------------
  717. -- Table structure for t_ds_version
  718. -- ----------------------------
  719. DROP TABLE IF EXISTS `t_ds_version`;
  720. CREATE TABLE `t_ds_version` (
  721. `id` int(11) NOT NULL AUTO_INCREMENT,
  722. `version` varchar(200) NOT NULL,
  723. PRIMARY KEY (`id`),
  724. UNIQUE KEY `version_UNIQUE` (`version`)
  725. ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COMMENT='version';
  726. -- ----------------------------
  727. -- Records of t_ds_version
  728. -- ----------------------------
  729. INSERT INTO `t_ds_version` VALUES ('1', '1.3.0');
  730. -- ----------------------------
  731. -- Records of t_ds_alertgroup
  732. -- ----------------------------
  733. 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');
  734. -- ----------------------------
  735. -- Records of t_ds_relation_user_alertgroup
  736. -- ----------------------------
  737. INSERT INTO `t_ds_relation_user_alertgroup` VALUES ('1', '1', '1', '2018-11-29 10:22:33', '2018-11-29 10:22:33');
  738. -- ----------------------------
  739. -- Records of t_ds_user
  740. -- ----------------------------
  741. INSERT INTO `t_ds_user` VALUES ('1', 'admin', '7ad2410b2f4c074479a8937a28a22b8f', '0', 'xxx@qq.com', 'xx', '0', '2018-03-27 15:48:50', '2018-10-24 17:40:22', null);