diff --git a/backend/framework/domain/src/main/resources/migration/3.5.0/ddl/V3.5.0_2__ga_ddl.sql b/backend/framework/domain/src/main/resources/migration/3.5.0/ddl/V3.5.0_2__ga_ddl.sql index bec77cb592..02c4b8d765 100644 --- a/backend/framework/domain/src/main/resources/migration/3.5.0/ddl/V3.5.0_2__ga_ddl.sql +++ b/backend/framework/domain/src/main/resources/migration/3.5.0/ddl/V3.5.0_2__ga_ddl.sql @@ -93,5 +93,12 @@ ALTER TABLE exec_task ADD environment_id varchar(50) NULL COMMENT '用例批量 ALTER TABLE exec_task ADD env_grouped bit(1) DEFAULT 0 NULL COMMENT '是否是环境组'; ALTER TABLE exec_task ADD pool_id varchar(50) NULL COMMENT '资源池ID'; +-- 执行状态字段添加默认值 +ALTER TABLE test_plan_functional_case ALTER COLUMN last_exec_result SET DEFAULT ''; +ALTER TABLE test_plan_api_case ALTER COLUMN last_exec_result SET DEFAULT ''; +ALTER TABLE test_plan_api_scenario ALTER COLUMN last_exec_result SET DEFAULT ''; +ALTER TABLE api_test_case ALTER COLUMN last_report_status SET DEFAULT ''; +ALTER TABLE api_scenario ALTER COLUMN last_report_status SET DEFAULT ''; + -- set innodb lock wait timeout to default SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/backend/framework/domain/src/main/resources/migration/3.5.0/dml/V3.5.0_2_1__data.sql b/backend/framework/domain/src/main/resources/migration/3.5.0/dml/V3.5.0_2_1__data.sql index 82dc8ebdbc..82a22b4c93 100644 --- a/backend/framework/domain/src/main/resources/migration/3.5.0/dml/V3.5.0_2_1__data.sql +++ b/backend/framework/domain/src/main/resources/migration/3.5.0/dml/V3.5.0_2_1__data.sql @@ -1,6 +1,12 @@ -- set innodb lock wait timeout SET SESSION innodb_lock_wait_timeout = 7200; +-- 批量更新执行状态为空串 +UPDATE test_plan_functional_case SET last_exec_result = '' WHERE last_exec_result is null OR last_exec_result = 'PENDING' OR last_exec_result = '-'; +UPDATE test_plan_api_case SET last_exec_result = '' WHERE last_exec_result is null OR last_exec_result = 'PENDING' OR last_exec_result = '-'; +UPDATE test_plan_api_scenario SET last_exec_result = '' WHERE last_exec_result is null OR last_exec_result = 'PENDING' OR last_exec_result = '-'; +UPDATE api_test_case SET last_report_status = '' WHERE last_report_status = 'PENDING' OR last_report_status = '-'; +UPDATE api_scenario SET last_report_status = '' WHERE last_report_status = 'PENDING' OR last_report_status = '-'; -- set innodb lock wait timeout to default SET SESSION innodb_lock_wait_timeout = DEFAULT; \ No newline at end of file