diff --git a/support-files/sql/1001_ci_process_ddl_mysql.sql b/support-files/sql/1001_ci_process_ddl_mysql.sql index d8ef3dd3758..9550cbabe08 100644 --- a/support-files/sql/1001_ci_process_ddl_mysql.sql +++ b/support-files/sql/1001_ci_process_ddl_mysql.sql @@ -1280,4 +1280,23 @@ CREATE TABLE IF NOT EXISTS `T_PIPELINE_WEBHOOK_VERSION` UNIQUE UNI_PROJECT_PIPELINE_TASK (`PROJECT_ID`, `PIPELINE_ID`, `VERSION`, `TASK_ID`) ) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COMMENT = '流水线webhook版本'; +-- devops_process.T_PIPELINE_SUB_REF definition + +CREATE TABLE `T_PIPELINE_SUB_REF` ( + `ID` bigint(20) NOT NULL AUTO_INCREMENT, + `PROJECT_ID` varchar(64) DEFAULT NULL COMMENT '蓝盾项目ID', + `PIPELINE_ID` varchar(64) DEFAULT NULL COMMENT '蓝盾流水线ID', + `STAGE_NAME` varchar(64) DEFAULT NULL COMMENT 'STAGE名称', + `TASK_ID` varchar(64) DEFAULT NULL COMMENT 'TASKID', + `TASK_NAME` varchar(256) DEFAULT NULL COMMENT 'TASK名称', + `SUB_PROJECT_ID` varchar(64) DEFAULT NULL COMMENT '子流水线项目ID', + `SUB_PIPELINE_ID` varchar(64) DEFAULT NULL COMMENT '子流水线流水线ID', + `PIPELINE_NAME` varchar(256) DEFAULT NULL COMMENT '流水线名称', + `CHANNEL` varchar(32) DEFAULT NULL COMMENT '流水线渠道', + `CONTAINER_NAME` varchar(256) DEFAULT NULL COMMENT 'JOB名称', + `SUB_PIPELINE_NAME` varchar(256) DEFAULT NULL COMMENT '子流水线名', + PRIMARY KEY (`ID`), + UNIQUE KEY `T_SUB_PIPELINE_REF_UNIQUE` (`PROJECT_ID`,`PIPELINE_ID`,`TASK_ID`) +) ENGINE=InnoDB AUTO_INCREMENT=209 DEFAULT CHARSET=utf8mb4 COMMENT='子流水线依赖关系'; + SET FOREIGN_KEY_CHECKS = 1;