From 6bd437d666329b3978f474dd7e93a48d0b6a03a1 Mon Sep 17 00:00:00 2001 From: wxg0103 <727495428@qq.com> Date: Wed, 29 May 2024 17:37:22 +0800 Subject: [PATCH] =?UTF-8?q?refactor(=E7=B3=BB=E7=BB=9F=E8=AE=BE=E7=BD=AE):?= =?UTF-8?q?=20=E4=BC=98=E5=8C=96sql?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../3.0.0/ddl/V3.0.0_12__beta_ddl.sql | 3 --- .../3.0.0/ddl/V3.0.0_3__test_plan.sql | 20 ------------------- .../3.0.0/ddl/V3.0.0_5__api_test.sql | 1 - .../test/resources/ddl/test_plan_api_case.sql | 2 +- 4 files changed, 1 insertion(+), 25 deletions(-) diff --git a/backend/framework/domain/src/main/resources/migration/3.0.0/ddl/V3.0.0_12__beta_ddl.sql b/backend/framework/domain/src/main/resources/migration/3.0.0/ddl/V3.0.0_12__beta_ddl.sql index 7ba38bc4d0..6d6b3970be 100644 --- a/backend/framework/domain/src/main/resources/migration/3.0.0/ddl/V3.0.0_12__beta_ddl.sql +++ b/backend/framework/domain/src/main/resources/migration/3.0.0/ddl/V3.0.0_12__beta_ddl.sql @@ -28,9 +28,6 @@ ALTER TABLE test_resource_pool DROP COLUMN api_test; ALTER TABLE test_resource_pool DROP COLUMN load_test; ALTER TABLE test_resource_pool DROP COLUMN ui_test; --- drop test_resource_pool column -DROP TABLE test_plan_bug; - CREATE TABLE IF NOT EXISTS test_plan_allocation( `id` VARCHAR(50) NOT NULL COMMENT 'ID', diff --git a/backend/framework/domain/src/main/resources/migration/3.0.0/ddl/V3.0.0_3__test_plan.sql b/backend/framework/domain/src/main/resources/migration/3.0.0/ddl/V3.0.0_3__test_plan.sql index eb85a87cac..8e6713bd5c 100644 --- a/backend/framework/domain/src/main/resources/migration/3.0.0/ddl/V3.0.0_3__test_plan.sql +++ b/backend/framework/domain/src/main/resources/migration/3.0.0/ddl/V3.0.0_3__test_plan.sql @@ -143,26 +143,6 @@ CREATE TABLE IF NOT EXISTS test_plan_follower DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '测试计划关注人'; -CREATE TABLE IF NOT EXISTS test_plan_bug -( - `id` VARCHAR(50) NOT NULL COMMENT 'ID', - `num` BIGINT NOT NULL COMMENT 'num', - `test_plan_id` VARCHAR(50) NOT NULL COMMENT '测试计划ID;测试计划ID', - `case_id` VARCHAR(50) NOT NULL COMMENT '接口用例ID;测试用例ID(包含功能、接口、场景等)', - `case_type` VARCHAR(50) NOT NULL COMMENT '用例类型;用例类型(FUNCTIONAL_CASE/API_TEST_CASE/API_SCENARIO)', - `bug_id` VARCHAR(50) NOT NULL COMMENT '缺陷id;缺陷ID', - `create_time` BIGINT NOT NULL COMMENT '创建时间', - `create_user` VARCHAR(50) NOT NULL COMMENT '创建人', - PRIMARY KEY (id) -) ENGINE = InnoDB - DEFAULT CHARSET = utf8mb4 - COLLATE = utf8mb4_general_ci COMMENT = '测试计划关联接口用例'; - -CREATE INDEX idx_case_id ON test_plan_bug (case_id); -CREATE INDEX idx_test_plan_id ON test_plan_bug (test_plan_id); -CREATE INDEX idx_create_user ON test_plan_bug (create_user); -CREATE INDEX idx_bug_id ON test_plan_bug (bug_id); - -- set innodb lock wait timeout to default SET SESSION innodb_lock_wait_timeout = DEFAULT; \ No newline at end of file diff --git a/backend/framework/domain/src/main/resources/migration/3.0.0/ddl/V3.0.0_5__api_test.sql b/backend/framework/domain/src/main/resources/migration/3.0.0/ddl/V3.0.0_5__api_test.sql index f81a980c66..546b3007a9 100644 --- a/backend/framework/domain/src/main/resources/migration/3.0.0/ddl/V3.0.0_5__api_test.sql +++ b/backend/framework/domain/src/main/resources/migration/3.0.0/ddl/V3.0.0_5__api_test.sql @@ -609,7 +609,6 @@ CREATE INDEX idx_name ON api_scenario_csv(name); CREATE INDEX idx_file_name ON api_scenario_csv(file_name); CREATE INDEX idx_project_id ON api_scenario_csv(project_id); -DROP TABLE IF EXISTS api_scenario_csv_step; CREATE TABLE api_scenario_csv_step ( `id` VARCHAR(50) NOT NULL COMMENT 'id', diff --git a/backend/services/test-plan/src/test/resources/ddl/test_plan_api_case.sql b/backend/services/test-plan/src/test/resources/ddl/test_plan_api_case.sql index 3e6097c3e0..e28e602545 100644 --- a/backend/services/test-plan/src/test/resources/ddl/test_plan_api_case.sql +++ b/backend/services/test-plan/src/test/resources/ddl/test_plan_api_case.sql @@ -1,4 +1,4 @@ -DROP TABLE IF EXISTS test_plan_api_case; + CREATE TABLE test_plan_api_case( `id` VARCHAR(50) NOT NULL COMMENT 'ID' , `test_plan_id` VARCHAR(50) NOT NULL COMMENT '测试计划ID' ,