refactor(系统设置): 优化sql

This commit is contained in:
wxg0103 2024-05-29 17:37:22 +08:00 committed by Craftsman
parent cd83354545
commit 6bd437d666
4 changed files with 1 additions and 25 deletions

View File

@ -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',

View File

@ -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;

View File

@ -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',

View File

@ -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' ,