fix(接口测试): 删除接口测试报告表不再使用的字段

删除接口测试报告表不再使用的字段
This commit is contained in:
song-tianyang 2023-04-21 13:57:57 +08:00 committed by 刘瑞斌
parent 3812c7b1d9
commit a9b554f1c4
1 changed files with 18 additions and 0 deletions

View File

@ -0,0 +1,18 @@
SET SESSION innodb_lock_wait_timeout = 7200;
-- 删除v1.20.14版本使用2.9不再使用的字段
SELECT IF(
EXISTS(SELECT DISTINCT column_name
FROM information_schema.columns
WHERE table_schema = DATABASE()
AND table_name = 'api_scenario_report'
AND column_name = 'md5_scenario_id'),
'ALTER TABLE api_scenario_report DROP COLUMN md5_scenario_id',
'select 1'
)
INTO @a;
PREPARE dropColumn FROM @a;
EXECUTE dropColumn;
DEALLOCATE PREPARE dropColumn;
SET SESSION innodb_lock_wait_timeout = DEFAULT;