123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533 |
- SET NAMES utf8mb4;
- SET FOREIGN_KEY_CHECKS = 0;
- -- ----------------------------
- -- Table structure for airflow_job
- -- ----------------------------
- DROP TABLE IF EXISTS `airflow_job`;
- CREATE TABLE `airflow_job` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `name` text CHARACTER SET utf8 COLLATE utf8_unicode_ci,
- `job_type` int(11) DEFAULT NULL,
- `tasks` json DEFAULT NULL,
- `dependence` json DEFAULT NULL,
- `cron` text CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
- `desc` text CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
- `route_strategy` varchar(32) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
- `block_strategy` varchar(32) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
- `executor_timeout` int(11) NOT NULL,
- `executor_fail_retry_count` int(11) NOT NULL,
- `trigger_status` int(11) NOT NULL,
- `trigger_last_time` int(11) DEFAULT NULL,
- `trigger_next_time` int(11) DEFAULT NULL,
- `create_time` int(11) DEFAULT NULL,
- `update_time` int(11) DEFAULT NULL,
- `user_id` int(11) DEFAULT NULL,
- `job_mode` int(2) DEFAULT '1',
- PRIMARY KEY (`id`),
- KEY `ix_airflow_job_id` (`id`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
- -- ----------------------------
- -- Records of airflow_job
- -- ----------------------------
- BEGIN;
- COMMIT;
- -- ----------------------------
- -- Table structure for airflow_run
- -- ----------------------------
- DROP TABLE IF EXISTS `airflow_run`;
- CREATE TABLE `airflow_run` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `start_time` double DEFAULT NULL,
- `end_time` float DEFAULT NULL,
- `job_id` int(11) DEFAULT NULL,
- `af_run_id` varchar(60) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
- `status` int(11) DEFAULT NULL,
- `details` json DEFAULT NULL,
- `run_ts` varchar(60) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
- PRIMARY KEY (`id`),
- KEY `ix_airflow_run_id` (`id`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
- -- ----------------------------
- -- Records of airflow_run
- -- ----------------------------
- BEGIN;
- COMMIT;
- -- ----------------------------
- -- Table structure for airflow_task
- -- ----------------------------
- DROP TABLE IF EXISTS `airflow_task`;
- CREATE TABLE `airflow_task` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `name` text CHARACTER SET utf8 COLLATE utf8_unicode_ci,
- `task_type` varchar(16) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
- `file_urls` json DEFAULT NULL,
- `script` text CHARACTER SET utf8 COLLATE utf8_unicode_ci,
- `cmd` text CHARACTER SET utf8 COLLATE utf8_unicode_ci,
- `cmd_parameters` text CHARACTER SET utf8 COLLATE utf8_unicode_ci,
- `envs` json DEFAULT NULL,
- `run_image` text CHARACTER SET utf8 COLLATE utf8_unicode_ci,
- `create_time` int(11) DEFAULT NULL,
- `update_time` int(11) DEFAULT NULL,
- `user_id` int(11) DEFAULT NULL,
- PRIMARY KEY (`id`),
- KEY `ix_airflow_task_id` (`id`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
- -- ----------------------------
- -- Records of airflow_task
- -- ----------------------------
- BEGIN;
- COMMIT;
- -- ----------------------------
- -- Table structure for constant
- -- ----------------------------
- DROP TABLE IF EXISTS `constant`;
- CREATE TABLE `constant` (
- `id` bigint(20) NOT NULL AUTO_INCREMENT,
- `type` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '常量类型',
- `value` varchar(500) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '常量值',
- PRIMARY KEY (`id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb4 COMMENT='常量表';
- -- ----------------------------
- -- Records of constant
- -- ----------------------------
- BEGIN;
- INSERT INTO `constant` (`id`, `type`, `value`) VALUES (1, '作业类型', 'Java');
- INSERT INTO `constant` (`id`, `type`, `value`) VALUES (2, '作业类型', 'Python');
- INSERT INTO `constant` (`id`, `type`, `value`) VALUES (3, '作业类型', 'Dag');
- INSERT INTO `constant` (`id`, `type`, `value`) VALUES (4, '作业标签', '业务预测');
- INSERT INTO `constant` (`id`, `type`, `value`) VALUES (5, '作业标签', '作业监测');
- INSERT INTO `constant` (`id`, `type`, `value`) VALUES (6, '作业标签', '人力系统');
- INSERT INTO `constant` (`id`, `type`, `value`) VALUES (7, '任务标签', '业务预测');
- INSERT INTO `constant` (`id`, `type`, `value`) VALUES (8, '任务标签', '任务监测');
- INSERT INTO `constant` (`id`, `type`, `value`) VALUES (9, '任务标签', '人力系统');
- COMMIT;
- -- ----------------------------
- -- Table structure for data_management
- -- ----------------------------
- DROP TABLE IF EXISTS `data_management`;
- CREATE TABLE `data_management` (
- `id` bigint(20) NOT NULL AUTO_INCREMENT,
- `name` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '数据名称',
- `table_name` varchar(255) DEFAULT NULL COMMENT '表名',
- `create_time` bigint(13) NOT NULL COMMENT '创建时间',
- `user_name` varchar(20) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '创建人名称',
- `user_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '创建人编号',
- `project_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '项目编号',
- `af_run_id` varchar(100) NOT NULL COMMENT 'airflow运行id',
- `status` tinyint(4) NOT NULL COMMENT '状态(1:转存中,2:成功,3:失败)',
- PRIMARY KEY (`id`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='数据管理';
- -- ----------------------------
- -- Records of data_management
- -- ----------------------------
- BEGIN;
- COMMIT;
- -- ----------------------------
- -- Table structure for data_table
- -- ----------------------------
- DROP TABLE IF EXISTS `data_table`;
- CREATE TABLE `data_table` (
- `id` bigint(20) NOT NULL AUTO_INCREMENT,
- `database_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '库名',
- `table_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '表名',
- `source` tinyint(4) NOT NULL COMMENT '源(0:数据湖;1:ailab)',
- `type` tinyint(4) NOT NULL COMMENT '类型(0:被分享;1:自建;2:导入)',
- `project_id` varchar(50) NOT NULL COMMENT '项目id',
- `table_path` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'hdfs的path',
- `create_time` bigint(20) NOT NULL COMMENT '创建时间',
- `user_id` varchar(50) NOT NULL COMMENT '创建人、分享人',
- PRIMARY KEY (`id`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='表';
- -- ----------------------------
- -- Records of data_table
- -- ----------------------------
- BEGIN;
- COMMIT;
- -- ----------------------------
- -- Table structure for jm_homework
- -- ----------------------------
- DROP TABLE IF EXISTS `jm_homework`;
- CREATE TABLE `jm_homework` (
- `id` bigint(20) NOT NULL AUTO_INCREMENT,
- `name` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '作业名称',
- `type` varchar(20) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '作业类型',
- `tag` varchar(20) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '作业分类',
- `image_url` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '执行镜像',
- `dag_uuid` varchar(32) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'DAG_ID',
- `dag_url` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'DAG文件地址',
- `script_file` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '脚本文件',
- `execute_command` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '执行命令',
- `update_time` int(13) DEFAULT NULL COMMENT '更新时间',
- `create_time` int(13) NOT NULL COMMENT '创建时间',
- `user_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '用户ID',
- `project_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '项目ID',
- `status` tinyint(4) NOT NULL COMMENT '状态(0:已删除,1:未删除)',
- PRIMARY KEY (`id`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='作业信息';
- -- ----------------------------
- -- Records of jm_homework
- -- ----------------------------
- BEGIN;
- COMMIT;
- -- ----------------------------
- -- Table structure for jm_homework_datasource_relation
- -- ----------------------------
- DROP TABLE IF EXISTS `jm_homework_datasource_relation`;
- CREATE TABLE `jm_homework_datasource_relation` (
- `id` bigint(20) NOT NULL AUTO_INCREMENT,
- `type` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '类型',
- `datasource_id` bigint(20) NOT NULL COMMENT '数据源ID',
- `node_uuid` varchar(32) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '节点uuid',
- `table` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '数据源对应数据表',
- `homework_id` bigint(20) NOT NULL COMMENT '作业ID',
- PRIMARY KEY (`id`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='作业与数据源关系表';
- -- ----------------------------
- -- Records of jm_homework_datasource_relation
- -- ----------------------------
- BEGIN;
- COMMIT;
- -- ----------------------------
- -- Table structure for jm_job_edge
- -- ----------------------------
- DROP TABLE IF EXISTS `jm_job_edge`;
- CREATE TABLE `jm_job_edge` (
- `id` bigint(20) NOT NULL AUTO_INCREMENT,
- `in_node_id` bigint(20) DEFAULT NULL,
- `out_node_id` bigint(20) DEFAULT NULL,
- `job_id` bigint(20) NOT NULL,
- PRIMARY KEY (`id`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Job节点关系表';
- -- ----------------------------
- -- Records of jm_job_edge
- -- ----------------------------
- BEGIN;
- COMMIT;
- -- ----------------------------
- -- Table structure for jm_job_info
- -- ----------------------------
- DROP TABLE IF EXISTS `jm_job_info`;
- CREATE TABLE `jm_job_info` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `name` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '任务名称',
- `type` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '任务类型',
- `tag` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '任务分类',
- `cron_type` tinyint(4) NOT NULL COMMENT '周期类型(1:单次;2:循环)',
- `cron_select_type` tinyint(4) DEFAULT NULL COMMENT '选择周期类型(0:时,1:日,2:周,3:月,4:cron)',
- `cron_expression` varchar(30) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '周期表达式',
- `api` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'api调用',
- `json_str` varchar(10000) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '图形信息',
- `status` tinyint(4) NOT NULL COMMENT '状态(0:停用中;1:启用中)',
- `delete_status` tinyint(4) NOT NULL COMMENT '是否删除(0:已删除;1:未删除)',
- `user_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '用户ID',
- `user_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '用户名称',
- `project_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '项目ID',
- `create_time` int(20) DEFAULT NULL COMMENT '创建时间',
- `update_time` int(20) DEFAULT NULL COMMENT '修改时间',
- PRIMARY KEY (`id`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='定时任务详情';
- -- ----------------------------
- -- Records of jm_job_info
- -- ----------------------------
- BEGIN;
- COMMIT;
- -- ----------------------------
- -- Table structure for jm_job_node
- -- ----------------------------
- DROP TABLE IF EXISTS `jm_job_node`;
- CREATE TABLE `jm_job_node` (
- `id` bigint(20) NOT NULL AUTO_INCREMENT,
- `job_id` bigint(20) NOT NULL COMMENT '任务ID',
- `homework_id` bigint(20) DEFAULT NULL COMMENT '作业ID',
- `homework_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '作业名称',
- `start_point` tinyint(4) NOT NULL COMMENT '起始点(0:起始点;1:非起始点)',
- PRIMARY KEY (`id`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Job节点表';
- -- ----------------------------
- -- Records of jm_job_node
- -- ----------------------------
- BEGIN;
- COMMIT;
- -- ----------------------------
- -- Table structure for job_info
- -- ----------------------------
- DROP TABLE IF EXISTS `job_info`;
- CREATE TABLE `job_info` (
- `id` bigint(20) NOT NULL AUTO_INCREMENT,
- `cron_select_type` tinyint(4) NOT NULL COMMENT '周期选择类型',
- `job_cron` varchar(128) NOT NULL COMMENT '任务执行CRON',
- `job_desc` varchar(255) NOT NULL,
- `create_time` int(20) DEFAULT NULL COMMENT '创建时间',
- `update_time` int(20) DEFAULT NULL COMMENT '更新时间',
- `user_id` varchar(50) NOT NULL COMMENT '用户ID',
- `executor_route_strategy` varchar(50) DEFAULT NULL COMMENT '执行器路由策略',
- `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
- `executor_param` varchar(512) DEFAULT NULL COMMENT '执行器任务参数',
- `executor_block_strategy` varchar(50) DEFAULT NULL COMMENT '阻塞处理策略',
- `executor_timeout` int(11) NOT NULL DEFAULT '0' COMMENT '任务执行超时时间,单位秒',
- `executor_fail_retry_count` int(11) NOT NULL DEFAULT '0' COMMENT '失败重试次数',
- `trigger_status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '调度状态:0-停止,1-运行',
- `trigger_last_time` bigint(13) DEFAULT NULL COMMENT '上次调度时间',
- `trigger_next_time` bigint(13) DEFAULT NULL COMMENT '下次调度时间',
- `job_json` text CHARACTER SET utf8 COMMENT 'datax运行脚本',
- `inc_start_time` int(11) DEFAULT NULL COMMENT '增量初始时间',
- `last_handle_code` int(11) DEFAULT NULL COMMENT '最近一次执行状态',
- `delete_status` tinyint(4) NOT NULL COMMENT '数据状态:0-无效,1-有效',
- `replace_param` varchar(50) DEFAULT NULL COMMENT '增量时间',
- `partition_info` varchar(50) DEFAULT NULL COMMENT '分区信息',
- `jvm_param` varchar(50) DEFAULT NULL COMMENT 'jvm参数',
- `last_time` varchar(50) DEFAULT NULL COMMENT '上次时间字段',
- `current_time` varchar(50) DEFAULT NULL COMMENT '当前时间字段',
- `project_id` varchar(50) NOT NULL COMMENT '项目id',
- PRIMARY KEY (`id`) USING BTREE
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;
- -- ----------------------------
- -- Records of job_info
- -- ----------------------------
- BEGIN;
- COMMIT;
- -- ----------------------------
- -- Table structure for job_jdbc_datasource
- -- ----------------------------
- DROP TABLE IF EXISTS `job_jdbc_datasource`;
- CREATE TABLE `job_jdbc_datasource` (
- `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '自增主键',
- `datasource_name` varchar(200) NOT NULL COMMENT '数据源名称',
- `datasource` varchar(45) NOT NULL COMMENT '数据源',
- `datasource_group` varchar(200) DEFAULT 'Default' COMMENT '数据源分组',
- `database_name` varchar(45) NOT NULL COMMENT '数据库名',
- `jdbc_username` varchar(100) DEFAULT NULL COMMENT '用户名',
- `jdbc_password` varchar(200) DEFAULT NULL COMMENT '密码',
- `jdbc_url` varchar(500) NOT NULL COMMENT 'jdbc url',
- `jdbc_driver_class` varchar(200) DEFAULT NULL COMMENT 'jdbc驱动类',
- `status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '状态:0删除 1启用 2禁用',
- `create_by` varchar(20) DEFAULT NULL COMMENT '创建人',
- `create_time` int(20) DEFAULT NULL COMMENT '创建时间',
- `update_by` varchar(20) DEFAULT NULL COMMENT '更新人',
- `update_time` int(20) DEFAULT NULL COMMENT '更新时间',
- `comments` varchar(1000) DEFAULT NULL COMMENT '备注',
- `tag` varchar(20) DEFAULT NULL COMMENT '标签: 0开发1测试2开发',
- `kerberos` tinyint(1) NOT NULL COMMENT 'kerberos验证是否开启(0:不开启,1:开启)',
- `keytab` varchar(200) DEFAULT NULL COMMENT 'keytab文件',
- `krb5config` varchar(200) DEFAULT NULL COMMENT 'krb5config',
- `kerberos_service_name` varchar(100) DEFAULT NULL COMMENT 'kerberos_service_name',
- `principal` varchar(100) DEFAULT NULL COMMENT 'principal',
- `use_ssl` tinyint(1) DEFAULT NULL COMMENT '是否使用ssl(0:不使用,1:使用)',
- PRIMARY KEY (`id`) USING BTREE
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='jdbc数据源配置';
- -- ----------------------------
- -- Records of job_jdbc_datasource
- -- ----------------------------
- BEGIN;
- COMMIT;
- -- ----------------------------
- -- Table structure for job_log
- -- ----------------------------
- DROP TABLE IF EXISTS `job_log`;
- CREATE TABLE `job_log` (
- `id` bigint(20) NOT NULL AUTO_INCREMENT,
- `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
- `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
- `executor_address` varchar(255) DEFAULT NULL COMMENT '执行器地址,本次执行的地址',
- `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
- `executor_param` varchar(512) DEFAULT NULL COMMENT '执行器任务参数',
- `executor_sharding_param` varchar(20) DEFAULT NULL COMMENT '执行器任务分片参数,格式如 1/2',
- `executor_fail_retry_count` int(11) DEFAULT '0' COMMENT '失败重试次数',
- `trigger_time` bigint(13) DEFAULT NULL COMMENT '调度-时间',
- `trigger_code` int(11) NOT NULL COMMENT '调度-结果 0-失败,1-成功,2-无',
- `trigger_msg` text COMMENT '调度-日志',
- `handle_time` bigint(13) DEFAULT NULL COMMENT '执行-时间',
- `handle_code` int(11) NOT NULL COMMENT '执行-状态 0-失败,1-成功,2-无',
- `handle_msg` text COMMENT '执行-日志',
- `alarm_status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '告警状态:0-默认、1-无需告警、2-告警成功、3-告警失败',
- `process_id` varchar(20) DEFAULT NULL COMMENT 'datax进程Id',
- PRIMARY KEY (`id`) USING BTREE,
- KEY `I_trigger_time` (`trigger_time`) USING BTREE,
- KEY `I_handle_code` (`handle_code`) USING BTREE
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;
- -- ----------------------------
- -- Records of job_log
- -- ----------------------------
- BEGIN;
- COMMIT;
- -- ----------------------------
- -- Table structure for programme
- -- ----------------------------
- DROP TABLE IF EXISTS `programme`;
- CREATE TABLE `programme` (
- `id` bigint(20) NOT NULL AUTO_INCREMENT,
- `name` varchar(50) NOT NULL COMMENT '名称',
- `password` varchar(300) NOT NULL COMMENT '密码(暗文)',
- `workspace` varchar(50) NOT NULL COMMENT '挂载目录',
- `base_url` varchar(50) NOT NULL COMMENT 'api_url',
- `image` varchar(100) NOT NULL COMMENT '使用镜像',
- `path` varchar(50) NOT NULL COMMENT '路径',
- `release_name` varchar(50) NOT NULL COMMENT '名称',
- `status` tinyint(4) NOT NULL COMMENT '状态',
- `create_time` int(11) NOT NULL COMMENT '创建时间',
- `user_id` varchar(50) NOT NULL COMMENT '用户id',
- `user_name` varchar(50) NOT NULL COMMENT '用户名称',
- `project_id` varchar(50) NOT NULL COMMENT '项目id',
- PRIMARY KEY (`id`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
- -- ----------------------------
- -- Records of programme
- -- ----------------------------
- BEGIN;
- COMMIT;
- -- ----------------------------
- -- Table structure for project
- -- ----------------------------
- DROP TABLE IF EXISTS `project`;
- CREATE TABLE `project` (
- `id` bigint(20) NOT NULL AUTO_INCREMENT,
- `name` varchar(30) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '项目名称',
- `code` varchar(128) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '项目编码',
- `type` tinyint(4) NOT NULL COMMENT '项目类型(0:算法组;1:普通项目)',
- `create_time` int(11) NOT NULL COMMENT '创建时间',
- `project_token` varchar(1000) DEFAULT NULL COMMENT 'project_token',
- PRIMARY KEY (`id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COMMENT='项目';
- -- ----------------------------
- -- Records of project
- -- ----------------------------
- BEGIN;
- INSERT INTO `project` (`id`, `name`, `code`, `type`, `create_time`, `project_token`) VALUES (1, '算法组', '7c73048c5b4e11ed89a813eaf8148d45', 0, 1669109848, 'eyJhbGciOiJIUzUxMiJ9.eyJwcm9qZWN0X2lkIjoxLCJ0eXBlIjowfQ.gFpw7Sa4chxVusVclsOA5ZBpbSnE2-GMOF6qL8DzPDP0JQ3b6msaaDZAC6EEoCUsR9kCh847BeorK163M2-fzA');
- COMMIT;
- -- ----------------------------
- -- Table structure for project_user_relation
- -- ----------------------------
- DROP TABLE IF EXISTS `project_user_relation`;
- CREATE TABLE `project_user_relation` (
- `id` bigint(20) NOT NULL AUTO_INCREMENT,
- `user_id` bigint(20) NOT NULL COMMENT '用户id',
- `project_id` bigint(20) NOT NULL COMMENT '项目id',
- `role_id` bigint(20) NOT NULL COMMENT '角色id',
- PRIMARY KEY (`id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COMMENT='项目用户关系';
- -- ----------------------------
- -- Records of project_user_relation
- -- ----------------------------
- BEGIN;
- INSERT INTO `project_user_relation` (`id`, `user_id`, `project_id`, `role_id`) VALUES (1, 1, 1, 1);
- COMMIT;
- -- ----------------------------
- -- Table structure for relation
- -- ----------------------------
- DROP TABLE IF EXISTS `relation`;
- CREATE TABLE `relation` (
- `id` bigint(20) NOT NULL AUTO_INCREMENT,
- `se_id` bigint(20) DEFAULT NULL COMMENT '服务端id(debug时不存在)',
- `type` varchar(20) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '(datax,job,task,debug)',
- `af_id` int(11) NOT NULL COMMENT 'airflow端id',
- `dag_uuid` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'dag_uuid(仅在debug时存在)',
- PRIMARY KEY (`id`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
- -- ----------------------------
- -- Records of relation
- -- ----------------------------
- BEGIN;
- COMMIT;
- -- ----------------------------
- -- Table structure for roles
- -- ----------------------------
- DROP TABLE IF EXISTS `roles`;
- CREATE TABLE `roles` (
- `id` bigint(20) NOT NULL AUTO_INCREMENT,
- `name` varchar(30) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '角色名',
- `code` varchar(128) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '角色编码',
- PRIMARY KEY (`id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COMMENT='角色';
- -- ----------------------------
- -- Records of roles
- -- ----------------------------
- BEGIN;
- INSERT INTO `roles` (`id`, `name`, `code`) VALUES (1, '超级管理员', '726a51e45b4d11edbb4809c4df301a');
- INSERT INTO `roles` (`id`, `name`, `code`) VALUES (2, '算法组管理员', '9ff183445b4d11ed87db29f50d093a');
- INSERT INTO `roles` (`id`, `name`, `code`) VALUES (3, '算法组成员', 'eef984e65b4d11ed8cc491f9c82401');
- INSERT INTO `roles` (`id`, `name`, `code`) VALUES (4, '项目管理员', '026bd8bc5b4e11ed857e6b5ec5c8d6');
- INSERT INTO `roles` (`id`, `name`, `code`) VALUES (5, '项目成员', '0ce1f4985b4e11ed992b8dab243eee');
- COMMIT;
- -- ----------------------------
- -- Table structure for users
- -- ----------------------------
- DROP TABLE IF EXISTS `users`;
- CREATE TABLE `users` (
- `id` bigint(20) NOT NULL AUTO_INCREMENT,
- `name` varchar(30) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '姓名',
- `code` varchar(128) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '用户编码',
- `username` varchar(30) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '用户名',
- `password` varchar(128) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '密码暗文',
- `create_time` int(11) NOT NULL COMMENT '创建时间',
- `user_token` varchar(1000) DEFAULT NULL COMMENT 'user_token',
- PRIMARY KEY (`id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COMMENT='项目用户';
- -- ----------------------------
- -- Records of users
- -- ----------------------------
- BEGIN;
- INSERT INTO `users` (`id`, `name`, `code`, `username`, `password`, `create_time`, `user_token`) VALUES (1, 'admin', '42acda425b4f11ed8c18f346385e9a10', 'admin', 'pbkdf2:sha256:150000$LKBvPzSN$8c14ad943aa4ee6863562f5e2194b379036229bd17d5f592c8b812c07a1ece7f', 1669109848, '');
- COMMIT;
- -- ----------------------------
- -- Alter for relation
- -- ----------------------------
- ALTER TABLE `relation`
- ADD COLUMN `af_run_id` varchar(100) NULL COMMENT 'airflow运行id' AFTER `dag_uuid`,
- ADD COLUMN `status` tinyint NULL COMMENT '执行状态(0:调度中,1:运行中,2:成功,3:失败)' AFTER `af_run_id`;
- -- ----------------------------
- -- Alter for jm_homework
- -- ----------------------------
- ALTER TABLE `jm_homework`
- ADD COLUMN `image_type` tinyint NULL COMMENT '镜像类型(0:默认,1:自建)' AFTER `tag`;
- -- ----------------------------
- -- Alter for programme
- -- ----------------------------
- ALTER TABLE `programme`
- ADD COLUMN `cpu` int(11) NOT NULL COMMENT 'cpu,默认2000m' AFTER `project_id`,
- ADD COLUMN `memory` int(11) NOT NULL COMMENT '内存,默认8192Mi' AFTER `cpu`,
- ADD COLUMN `node_selector` varchar(50) NULL COMMENT '调度节点' AFTER `memory`;
- SET FOREIGN_KEY_CHECKS = 1;
|