data.sql 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525
  1. SET NAMES utf8mb4;
  2. SET FOREIGN_KEY_CHECKS = 0;
  3. -- ----------------------------
  4. -- Table structure for airflow_job
  5. -- ----------------------------
  6. DROP TABLE IF EXISTS `airflow_job`;
  7. CREATE TABLE `airflow_job` (
  8. `id` int(11) NOT NULL AUTO_INCREMENT,
  9. `name` text CHARACTER SET utf8 COLLATE utf8_unicode_ci,
  10. `job_type` int(11) DEFAULT NULL,
  11. `tasks` json DEFAULT NULL,
  12. `dependence` json DEFAULT NULL,
  13. `cron` text CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  14. `desc` text CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  15. `route_strategy` varchar(32) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
  16. `block_strategy` varchar(32) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
  17. `executor_timeout` int(11) NOT NULL,
  18. `executor_fail_retry_count` int(11) NOT NULL,
  19. `trigger_status` int(11) NOT NULL,
  20. `trigger_last_time` int(11) DEFAULT NULL,
  21. `trigger_next_time` int(11) DEFAULT NULL,
  22. `create_time` int(11) DEFAULT NULL,
  23. `update_time` int(11) DEFAULT NULL,
  24. `user_id` int(11) DEFAULT NULL,
  25. `job_mode` int(2) DEFAULT '1',
  26. PRIMARY KEY (`id`),
  27. KEY `ix_airflow_job_id` (`id`)
  28. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
  29. -- ----------------------------
  30. -- Records of airflow_job
  31. -- ----------------------------
  32. BEGIN;
  33. COMMIT;
  34. -- ----------------------------
  35. -- Table structure for airflow_run
  36. -- ----------------------------
  37. DROP TABLE IF EXISTS `airflow_run`;
  38. CREATE TABLE `airflow_run` (
  39. `id` int(11) NOT NULL AUTO_INCREMENT,
  40. `start_time` double DEFAULT NULL,
  41. `end_time` float DEFAULT NULL,
  42. `job_id` int(11) DEFAULT NULL,
  43. `af_run_id` varchar(60) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
  44. `status` int(11) DEFAULT NULL,
  45. `details` json DEFAULT NULL,
  46. `run_ts` varchar(60) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
  47. PRIMARY KEY (`id`),
  48. KEY `ix_airflow_run_id` (`id`)
  49. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
  50. -- ----------------------------
  51. -- Records of airflow_run
  52. -- ----------------------------
  53. BEGIN;
  54. COMMIT;
  55. -- ----------------------------
  56. -- Table structure for airflow_task
  57. -- ----------------------------
  58. DROP TABLE IF EXISTS `airflow_task`;
  59. CREATE TABLE `airflow_task` (
  60. `id` int(11) NOT NULL AUTO_INCREMENT,
  61. `name` text CHARACTER SET utf8 COLLATE utf8_unicode_ci,
  62. `task_type` varchar(16) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
  63. `file_urls` json DEFAULT NULL,
  64. `script` text CHARACTER SET utf8 COLLATE utf8_unicode_ci,
  65. `cmd` text CHARACTER SET utf8 COLLATE utf8_unicode_ci,
  66. `cmd_parameters` text CHARACTER SET utf8 COLLATE utf8_unicode_ci,
  67. `envs` json DEFAULT NULL,
  68. `run_image` text CHARACTER SET utf8 COLLATE utf8_unicode_ci,
  69. `create_time` int(11) DEFAULT NULL,
  70. `update_time` int(11) DEFAULT NULL,
  71. `user_id` int(11) DEFAULT NULL,
  72. PRIMARY KEY (`id`),
  73. KEY `ix_airflow_task_id` (`id`)
  74. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
  75. -- ----------------------------
  76. -- Records of airflow_task
  77. -- ----------------------------
  78. BEGIN;
  79. COMMIT;
  80. -- ----------------------------
  81. -- Table structure for constant
  82. -- ----------------------------
  83. DROP TABLE IF EXISTS `constant`;
  84. CREATE TABLE `constant` (
  85. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  86. `type` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '常量类型',
  87. `value` varchar(500) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '常量值',
  88. PRIMARY KEY (`id`)
  89. ) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb4 COMMENT='常量表';
  90. -- ----------------------------
  91. -- Records of constant
  92. -- ----------------------------
  93. BEGIN;
  94. INSERT INTO `constant` (`id`, `type`, `value`) VALUES (1, '作业类型', 'Java');
  95. INSERT INTO `constant` (`id`, `type`, `value`) VALUES (2, '作业类型', 'Python');
  96. INSERT INTO `constant` (`id`, `type`, `value`) VALUES (3, '作业类型', 'Dag');
  97. INSERT INTO `constant` (`id`, `type`, `value`) VALUES (4, '作业标签', '业务预测');
  98. INSERT INTO `constant` (`id`, `type`, `value`) VALUES (5, '作业标签', '作业监测');
  99. INSERT INTO `constant` (`id`, `type`, `value`) VALUES (6, '作业标签', '人力系统');
  100. INSERT INTO `constant` (`id`, `type`, `value`) VALUES (7, '任务标签', '业务预测');
  101. INSERT INTO `constant` (`id`, `type`, `value`) VALUES (8, '任务标签', '任务监测');
  102. INSERT INTO `constant` (`id`, `type`, `value`) VALUES (9, '任务标签', '人力系统');
  103. COMMIT;
  104. -- ----------------------------
  105. -- Table structure for data_management
  106. -- ----------------------------
  107. DROP TABLE IF EXISTS `data_management`;
  108. CREATE TABLE `data_management` (
  109. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  110. `name` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '数据名称',
  111. `table_name` varchar(255) DEFAULT NULL COMMENT '表名',
  112. `create_time` bigint(13) NOT NULL COMMENT '创建时间',
  113. `user_name` varchar(20) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '创建人名称',
  114. `user_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '创建人编号',
  115. `project_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '项目编号',
  116. `af_run_id` varchar(100) NOT NULL COMMENT 'airflow运行id',
  117. `status` tinyint(4) NOT NULL COMMENT '状态(1:转存中,2:成功,3:失败)',
  118. PRIMARY KEY (`id`)
  119. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='数据管理';
  120. -- ----------------------------
  121. -- Records of data_management
  122. -- ----------------------------
  123. BEGIN;
  124. COMMIT;
  125. -- ----------------------------
  126. -- Table structure for data_table
  127. -- ----------------------------
  128. DROP TABLE IF EXISTS `data_table`;
  129. CREATE TABLE `data_table` (
  130. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  131. `database_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '库名',
  132. `table_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '表名',
  133. `source` tinyint(4) NOT NULL COMMENT '源(0:数据湖;1:ailab)',
  134. `type` tinyint(4) NOT NULL COMMENT '类型(0:被分享;1:自建;2:导入)',
  135. `project_id` varchar(50) NOT NULL COMMENT '项目id',
  136. `table_path` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'hdfs的path',
  137. `create_time` bigint(20) NOT NULL COMMENT '创建时间',
  138. `user_id` varchar(50) NOT NULL COMMENT '创建人、分享人',
  139. PRIMARY KEY (`id`)
  140. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='表';
  141. -- ----------------------------
  142. -- Records of data_table
  143. -- ----------------------------
  144. BEGIN;
  145. COMMIT;
  146. -- ----------------------------
  147. -- Table structure for jm_homework
  148. -- ----------------------------
  149. DROP TABLE IF EXISTS `jm_homework`;
  150. CREATE TABLE `jm_homework` (
  151. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  152. `name` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '作业名称',
  153. `type` varchar(20) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '作业类型',
  154. `tag` varchar(20) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '作业分类',
  155. `image_url` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '执行镜像',
  156. `dag_uuid` varchar(32) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'DAG_ID',
  157. `dag_url` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'DAG文件地址',
  158. `script_file` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '脚本文件',
  159. `execute_command` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '执行命令',
  160. `update_time` int(13) DEFAULT NULL COMMENT '更新时间',
  161. `create_time` int(13) NOT NULL COMMENT '创建时间',
  162. `user_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '用户ID',
  163. `project_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '项目ID',
  164. `status` tinyint(4) NOT NULL COMMENT '状态(0:已删除,1:未删除)',
  165. PRIMARY KEY (`id`)
  166. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='作业信息';
  167. -- ----------------------------
  168. -- Records of jm_homework
  169. -- ----------------------------
  170. BEGIN;
  171. COMMIT;
  172. -- ----------------------------
  173. -- Table structure for jm_homework_datasource_relation
  174. -- ----------------------------
  175. DROP TABLE IF EXISTS `jm_homework_datasource_relation`;
  176. CREATE TABLE `jm_homework_datasource_relation` (
  177. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  178. `type` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '类型',
  179. `datasource_id` bigint(20) NOT NULL COMMENT '数据源ID',
  180. `node_uuid` varchar(32) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '节点uuid',
  181. `table` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '数据源对应数据表',
  182. `homework_id` bigint(20) NOT NULL COMMENT '作业ID',
  183. PRIMARY KEY (`id`)
  184. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='作业与数据源关系表';
  185. -- ----------------------------
  186. -- Records of jm_homework_datasource_relation
  187. -- ----------------------------
  188. BEGIN;
  189. COMMIT;
  190. -- ----------------------------
  191. -- Table structure for jm_job_edge
  192. -- ----------------------------
  193. DROP TABLE IF EXISTS `jm_job_edge`;
  194. CREATE TABLE `jm_job_edge` (
  195. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  196. `in_node_id` bigint(20) DEFAULT NULL,
  197. `out_node_id` bigint(20) DEFAULT NULL,
  198. `job_id` bigint(20) NOT NULL,
  199. PRIMARY KEY (`id`)
  200. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Job节点关系表';
  201. -- ----------------------------
  202. -- Records of jm_job_edge
  203. -- ----------------------------
  204. BEGIN;
  205. COMMIT;
  206. -- ----------------------------
  207. -- Table structure for jm_job_info
  208. -- ----------------------------
  209. DROP TABLE IF EXISTS `jm_job_info`;
  210. CREATE TABLE `jm_job_info` (
  211. `id` int(11) NOT NULL AUTO_INCREMENT,
  212. `name` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '任务名称',
  213. `type` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '任务类型',
  214. `tag` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '任务分类',
  215. `cron_type` tinyint(4) NOT NULL COMMENT '周期类型(1:单次;2:循环)',
  216. `cron_select_type` tinyint(4) DEFAULT NULL COMMENT '选择周期类型(0:时,1:日,2:周,3:月,4:cron)',
  217. `cron_expression` varchar(30) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '周期表达式',
  218. `api` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'api调用',
  219. `json_str` varchar(10000) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '图形信息',
  220. `status` tinyint(4) NOT NULL COMMENT '状态(0:停用中;1:启用中)',
  221. `delete_status` tinyint(4) NOT NULL COMMENT '是否删除(0:已删除;1:未删除)',
  222. `user_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '用户ID',
  223. `user_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '用户名称',
  224. `project_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '项目ID',
  225. `create_time` int(20) DEFAULT NULL COMMENT '创建时间',
  226. `update_time` int(20) DEFAULT NULL COMMENT '修改时间',
  227. PRIMARY KEY (`id`)
  228. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='定时任务详情';
  229. -- ----------------------------
  230. -- Records of jm_job_info
  231. -- ----------------------------
  232. BEGIN;
  233. COMMIT;
  234. -- ----------------------------
  235. -- Table structure for jm_job_node
  236. -- ----------------------------
  237. DROP TABLE IF EXISTS `jm_job_node`;
  238. CREATE TABLE `jm_job_node` (
  239. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  240. `job_id` bigint(20) NOT NULL COMMENT '任务ID',
  241. `homework_id` bigint(20) DEFAULT NULL COMMENT '作业ID',
  242. `homework_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '作业名称',
  243. `start_point` tinyint(4) NOT NULL COMMENT '起始点(0:起始点;1:非起始点)',
  244. PRIMARY KEY (`id`)
  245. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Job节点表';
  246. -- ----------------------------
  247. -- Records of jm_job_node
  248. -- ----------------------------
  249. BEGIN;
  250. COMMIT;
  251. -- ----------------------------
  252. -- Table structure for job_info
  253. -- ----------------------------
  254. DROP TABLE IF EXISTS `job_info`;
  255. CREATE TABLE `job_info` (
  256. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  257. `cron_select_type` tinyint(4) NOT NULL COMMENT '周期选择类型',
  258. `job_cron` varchar(128) NOT NULL COMMENT '任务执行CRON',
  259. `job_desc` varchar(255) NOT NULL,
  260. `create_time` int(20) DEFAULT NULL COMMENT '创建时间',
  261. `update_time` int(20) DEFAULT NULL COMMENT '更新时间',
  262. `user_id` varchar(50) NOT NULL COMMENT '用户ID',
  263. `executor_route_strategy` varchar(50) DEFAULT NULL COMMENT '执行器路由策略',
  264. `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
  265. `executor_param` varchar(512) DEFAULT NULL COMMENT '执行器任务参数',
  266. `executor_block_strategy` varchar(50) DEFAULT NULL COMMENT '阻塞处理策略',
  267. `executor_timeout` int(11) NOT NULL DEFAULT '0' COMMENT '任务执行超时时间,单位秒',
  268. `executor_fail_retry_count` int(11) NOT NULL DEFAULT '0' COMMENT '失败重试次数',
  269. `trigger_status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '调度状态:0-停止,1-运行',
  270. `trigger_last_time` bigint(13) DEFAULT NULL COMMENT '上次调度时间',
  271. `trigger_next_time` bigint(13) DEFAULT NULL COMMENT '下次调度时间',
  272. `job_json` text CHARACTER SET utf8 COMMENT 'datax运行脚本',
  273. `inc_start_time` int(11) DEFAULT NULL COMMENT '增量初始时间',
  274. `last_handle_code` int(11) DEFAULT NULL COMMENT '最近一次执行状态',
  275. `delete_status` tinyint(4) NOT NULL COMMENT '数据状态:0-无效,1-有效',
  276. `replace_param` varchar(50) DEFAULT NULL COMMENT '增量时间',
  277. `partition_info` varchar(50) DEFAULT NULL COMMENT '分区信息',
  278. `jvm_param` varchar(50) DEFAULT NULL COMMENT 'jvm参数',
  279. `last_time` varchar(50) DEFAULT NULL COMMENT '上次时间字段',
  280. `current_time` varchar(50) DEFAULT NULL COMMENT '当前时间字段',
  281. `project_id` varchar(50) NOT NULL COMMENT '项目id',
  282. PRIMARY KEY (`id`) USING BTREE
  283. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;
  284. -- ----------------------------
  285. -- Records of job_info
  286. -- ----------------------------
  287. BEGIN;
  288. COMMIT;
  289. -- ----------------------------
  290. -- Table structure for job_jdbc_datasource
  291. -- ----------------------------
  292. DROP TABLE IF EXISTS `job_jdbc_datasource`;
  293. CREATE TABLE `job_jdbc_datasource` (
  294. `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '自增主键',
  295. `datasource_name` varchar(200) NOT NULL COMMENT '数据源名称',
  296. `datasource` varchar(45) NOT NULL COMMENT '数据源',
  297. `datasource_group` varchar(200) DEFAULT 'Default' COMMENT '数据源分组',
  298. `database_name` varchar(45) NOT NULL COMMENT '数据库名',
  299. `jdbc_username` varchar(100) DEFAULT NULL COMMENT '用户名',
  300. `jdbc_password` varchar(200) DEFAULT NULL COMMENT '密码',
  301. `jdbc_url` varchar(500) NOT NULL COMMENT 'jdbc url',
  302. `jdbc_driver_class` varchar(200) DEFAULT NULL COMMENT 'jdbc驱动类',
  303. `status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '状态:0删除 1启用 2禁用',
  304. `create_by` varchar(20) DEFAULT NULL COMMENT '创建人',
  305. `create_time` int(20) DEFAULT NULL COMMENT '创建时间',
  306. `update_by` varchar(20) DEFAULT NULL COMMENT '更新人',
  307. `update_time` int(20) DEFAULT NULL COMMENT '更新时间',
  308. `comments` varchar(1000) DEFAULT NULL COMMENT '备注',
  309. `tag` varchar(20) DEFAULT NULL COMMENT '标签: 0开发1测试2开发',
  310. `kerberos` tinyint(1) NOT NULL COMMENT 'kerberos验证是否开启(0:不开启,1:开启)',
  311. `keytab` varchar(200) DEFAULT NULL COMMENT 'keytab文件',
  312. `krb5config` varchar(200) DEFAULT NULL COMMENT 'krb5config',
  313. `kerberos_service_name` varchar(100) DEFAULT NULL COMMENT 'kerberos_service_name',
  314. `principal` varchar(100) DEFAULT NULL COMMENT 'principal',
  315. `use_ssl` tinyint(1) DEFAULT NULL COMMENT '是否使用ssl(0:不使用,1:使用)',
  316. PRIMARY KEY (`id`) USING BTREE
  317. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='jdbc数据源配置';
  318. -- ----------------------------
  319. -- Records of job_jdbc_datasource
  320. -- ----------------------------
  321. BEGIN;
  322. COMMIT;
  323. -- ----------------------------
  324. -- Table structure for job_log
  325. -- ----------------------------
  326. DROP TABLE IF EXISTS `job_log`;
  327. CREATE TABLE `job_log` (
  328. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  329. `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
  330. `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
  331. `executor_address` varchar(255) DEFAULT NULL COMMENT '执行器地址,本次执行的地址',
  332. `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
  333. `executor_param` varchar(512) DEFAULT NULL COMMENT '执行器任务参数',
  334. `executor_sharding_param` varchar(20) DEFAULT NULL COMMENT '执行器任务分片参数,格式如 1/2',
  335. `executor_fail_retry_count` int(11) DEFAULT '0' COMMENT '失败重试次数',
  336. `trigger_time` bigint(13) DEFAULT NULL COMMENT '调度-时间',
  337. `trigger_code` int(11) NOT NULL COMMENT '调度-结果 0-失败,1-成功,2-无',
  338. `trigger_msg` text COMMENT '调度-日志',
  339. `handle_time` bigint(13) DEFAULT NULL COMMENT '执行-时间',
  340. `handle_code` int(11) NOT NULL COMMENT '执行-状态 0-失败,1-成功,2-无',
  341. `handle_msg` text COMMENT '执行-日志',
  342. `alarm_status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '告警状态:0-默认、1-无需告警、2-告警成功、3-告警失败',
  343. `process_id` varchar(20) DEFAULT NULL COMMENT 'datax进程Id',
  344. PRIMARY KEY (`id`) USING BTREE,
  345. KEY `I_trigger_time` (`trigger_time`) USING BTREE,
  346. KEY `I_handle_code` (`handle_code`) USING BTREE
  347. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;
  348. -- ----------------------------
  349. -- Records of job_log
  350. -- ----------------------------
  351. BEGIN;
  352. COMMIT;
  353. -- ----------------------------
  354. -- Table structure for programme
  355. -- ----------------------------
  356. DROP TABLE IF EXISTS `programme`;
  357. CREATE TABLE `programme` (
  358. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  359. `name` varchar(50) NOT NULL COMMENT '名称',
  360. `password` varchar(300) NOT NULL COMMENT '密码(暗文)',
  361. `workspace` varchar(50) NOT NULL COMMENT '挂载目录',
  362. `base_url` varchar(50) NOT NULL COMMENT 'api_url',
  363. `image` varchar(100) NOT NULL COMMENT '使用镜像',
  364. `path` varchar(50) NOT NULL COMMENT '路径',
  365. `release_name` varchar(50) NOT NULL COMMENT '名称',
  366. `status` tinyint(4) NOT NULL COMMENT '状态',
  367. `create_time` int(11) NOT NULL COMMENT '创建时间',
  368. `user_id` varchar(50) NOT NULL COMMENT '用户id',
  369. `user_name` varchar(50) NOT NULL COMMENT '用户名称',
  370. `project_id` varchar(50) NOT NULL COMMENT '项目id',
  371. PRIMARY KEY (`id`)
  372. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  373. -- ----------------------------
  374. -- Records of programme
  375. -- ----------------------------
  376. BEGIN;
  377. COMMIT;
  378. -- ----------------------------
  379. -- Table structure for project
  380. -- ----------------------------
  381. DROP TABLE IF EXISTS `project`;
  382. CREATE TABLE `project` (
  383. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  384. `name` varchar(30) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '项目名称',
  385. `code` varchar(128) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '项目编码',
  386. `type` tinyint(4) NOT NULL COMMENT '项目类型(0:算法组;1:普通项目)',
  387. `create_time` int(11) NOT NULL COMMENT '创建时间',
  388. `project_token` varchar(1000) DEFAULT NULL COMMENT 'project_token',
  389. PRIMARY KEY (`id`)
  390. ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COMMENT='项目';
  391. -- ----------------------------
  392. -- Records of project
  393. -- ----------------------------
  394. BEGIN;
  395. INSERT INTO `project` (`id`, `name`, `code`, `type`, `create_time`, `project_token`) VALUES (1, '算法组', '7c73048c5b4e11ed89a813eaf8148d45', 0, 1669109848, 'eyJhbGciOiJIUzUxMiJ9.eyJwcm9qZWN0X2lkIjoxLCJ0eXBlIjowfQ.gFpw7Sa4chxVusVclsOA5ZBpbSnE2-GMOF6qL8DzPDP0JQ3b6msaaDZAC6EEoCUsR9kCh847BeorK163M2-fzA');
  396. COMMIT;
  397. -- ----------------------------
  398. -- Table structure for project_user_relation
  399. -- ----------------------------
  400. DROP TABLE IF EXISTS `project_user_relation`;
  401. CREATE TABLE `project_user_relation` (
  402. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  403. `user_id` bigint(20) NOT NULL COMMENT '用户id',
  404. `project_id` bigint(20) NOT NULL COMMENT '项目id',
  405. `role_id` bigint(20) NOT NULL COMMENT '角色id',
  406. PRIMARY KEY (`id`)
  407. ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COMMENT='项目用户关系';
  408. -- ----------------------------
  409. -- Records of project_user_relation
  410. -- ----------------------------
  411. BEGIN;
  412. INSERT INTO `project_user_relation` (`id`, `user_id`, `project_id`, `role_id`) VALUES (1, 1, 1, 1);
  413. COMMIT;
  414. -- ----------------------------
  415. -- Table structure for relation
  416. -- ----------------------------
  417. DROP TABLE IF EXISTS `relation`;
  418. CREATE TABLE `relation` (
  419. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  420. `se_id` bigint(20) DEFAULT NULL COMMENT '服务端id(debug时不存在)',
  421. `type` varchar(20) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '(datax,job,task,debug)',
  422. `af_id` int(11) NOT NULL COMMENT 'airflow端id',
  423. `dag_uuid` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'dag_uuid(仅在debug时存在)',
  424. PRIMARY KEY (`id`)
  425. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
  426. -- ----------------------------
  427. -- Records of relation
  428. -- ----------------------------
  429. BEGIN;
  430. COMMIT;
  431. -- ----------------------------
  432. -- Table structure for roles
  433. -- ----------------------------
  434. DROP TABLE IF EXISTS `roles`;
  435. CREATE TABLE `roles` (
  436. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  437. `name` varchar(30) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '角色名',
  438. `code` varchar(128) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '角色编码',
  439. PRIMARY KEY (`id`)
  440. ) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COMMENT='角色';
  441. -- ----------------------------
  442. -- Records of roles
  443. -- ----------------------------
  444. BEGIN;
  445. INSERT INTO `roles` (`id`, `name`, `code`) VALUES (1, '超级管理员', '726a51e45b4d11edbb4809c4df301a');
  446. INSERT INTO `roles` (`id`, `name`, `code`) VALUES (2, '算法组管理员', '9ff183445b4d11ed87db29f50d093a');
  447. INSERT INTO `roles` (`id`, `name`, `code`) VALUES (3, '算法组成员', 'eef984e65b4d11ed8cc491f9c82401');
  448. INSERT INTO `roles` (`id`, `name`, `code`) VALUES (4, '项目管理员', '026bd8bc5b4e11ed857e6b5ec5c8d6');
  449. INSERT INTO `roles` (`id`, `name`, `code`) VALUES (5, '项目成员', '0ce1f4985b4e11ed992b8dab243eee');
  450. COMMIT;
  451. -- ----------------------------
  452. -- Table structure for users
  453. -- ----------------------------
  454. DROP TABLE IF EXISTS `users`;
  455. CREATE TABLE `users` (
  456. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  457. `name` varchar(30) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '姓名',
  458. `code` varchar(128) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '用户编码',
  459. `username` varchar(30) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '用户名',
  460. `password` varchar(128) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '密码暗文',
  461. `create_time` int(11) NOT NULL COMMENT '创建时间',
  462. `user_token` varchar(1000) DEFAULT NULL COMMENT 'user_token',
  463. PRIMARY KEY (`id`)
  464. ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COMMENT='项目用户';
  465. -- ----------------------------
  466. -- Records of users
  467. -- ----------------------------
  468. BEGIN;
  469. INSERT INTO `users` (`id`, `name`, `code`, `username`, `password`, `create_time`, `user_token`) VALUES (1, 'admin', '42acda425b4f11ed8c18f346385e9a10', 'admin', 'pbkdf2:sha256:150000$LKBvPzSN$8c14ad943aa4ee6863562f5e2194b379036229bd17d5f592c8b812c07a1ece7f', 1669109848, '');
  470. COMMIT;
  471. -- ----------------------------
  472. -- Alter for relation
  473. -- ----------------------------
  474. ALTER TABLE `relation`
  475. ADD COLUMN `af_run_id` varchar(100) NULL COMMENT 'airflow运行id' AFTER `dag_uuid`,
  476. ADD COLUMN `status` tinyint NULL COMMENT '执行状态(0:调度中,1:运行中,2:成功,3:失败)' AFTER `af_run_id`;
  477. -- ----------------------------
  478. -- Alter for jm_homework
  479. -- ----------------------------
  480. ALTER TABLE `jm_homework`
  481. ADD COLUMN `image_type` tinyint NULL COMMENT '镜像类型(0:默认,1:自建)' AFTER `tag`;
  482. SET FOREIGN_KEY_CHECKS = 1;