From 865b99ddd4d4366aa5a3375a8b19452452ee12a4 Mon Sep 17 00:00:00 2001 From: CaptainB Date: Wed, 1 Feb 2023 10:47:24 +0800 Subject: [PATCH] =?UTF-8?q?build:=20flyway=20=E5=A2=9E=E5=8A=A0=E8=B6=85?= =?UTF-8?q?=E6=97=B6=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/db/migration/V2__2.3.0_release.sql | 7 ++++++- .../src/main/resources/db/migration/V3__2.4.1_release.sql | 6 +++++- .../src/main/resources/db/migration/V2__2.3.0_release.sql | 6 +++++- .../main/resources/db/migration/V100__v1.15.2_release.sql | 3 +++ .../main/resources/db/migration/V101__v1.15.3_release.sql | 4 +++- .../main/resources/db/migration/V102__v1.15.5_release.sql | 4 +++- .../main/resources/db/migration/V103__v1.16_release.sql | 3 +++ .../main/resources/db/migration/V104__v1.16.3_release.sql | 4 +++- .../main/resources/db/migration/V105__v1.16.5_release.sql | 3 +++ .../main/resources/db/migration/V106__v1.17_release.sql | 3 +++ .../main/resources/db/migration/V107__v1.17.2_release.sql | 4 +++- .../main/resources/db/migration/V108__v1.18_release.sql | 3 +++ .../main/resources/db/migration/V109__v1.18.1_release.sql | 3 +++ .../main/resources/db/migration/V10__modify_schedule.sql | 4 +++- .../main/resources/db/migration/V110__v1.19_release.sql | 4 +++- .../main/resources/db/migration/V111__v1.19.1_release.sql | 3 +++ .../main/resources/db/migration/V112__v1.19.2_release.sql | 3 +++ .../main/resources/db/migration/V113__v1.19.3_release.sql | 4 +++- .../main/resources/db/migration/V115__1.20__release.sql | 3 +++ .../main/resources/db/migration/V116__1.20.2__release.sql | 4 +++- .../main/resources/db/migration/V117__1.20.3__release.sql | 3 +++ .../main/resources/db/migration/V118__1.20.4__release.sql | 4 +++- .../main/resources/db/migration/V119__1.20.5__release.sql | 4 +++- .../src/main/resources/db/migration/V11__add_test_case.sql | 3 +++ .../main/resources/db/migration/V120__1.20.6__release.sql | 4 +++- .../main/resources/db/migration/V121__1.20.8__release.sql | 3 +++ .../main/resources/db/migration/V122__1.20.10__release.sql | 3 +++ .../resources/db/migration/V125__2.0.0_ddl__release.sql | 3 +++ .../resources/db/migration/V126__2.0.0_dml__release.sql | 3 +++ .../main/resources/db/migration/V127__2.0.1__release.sql | 3 +++ .../main/resources/db/migration/V129__2.1.0__release.sql | 3 +++ .../db/migration/V12__modify_load_test_report.sql | 4 +++- .../main/resources/db/migration/V130__2.2.0__release.sql | 3 +++ .../main/resources/db/migration/V131__2.3.0__release.sql | 4 +++- .../main/resources/db/migration/V132__2.4.0_release.sql | 4 +++- .../main/resources/db/migration/V133__2.5.0_release.sql | 3 +++ .../main/resources/db/migration/V134__2.6.0_release.sql | 4 +++- .../resources/db/migration/V13__service_integration.sql | 3 +++ .../main/resources/db/migration/V14__modify_project.sql | 4 +++- .../src/main/resources/db/migration/V15__add_quota.sql | 3 +++ .../resources/db/migration/V16__modify_test_case_path.sql | 3 +++ .../main/resources/db/migration/V17__test_plan_project.sql | 3 +++ .../src/main/resources/db/migration/V18__notice.sql | 3 +++ .../db/migration/V19__add_api_test_environment.sql | 4 +++- .../src/main/resources/db/migration/V20__add_license.sql | 3 +++ .../main/resources/db/migration/V21__modify_test_plan.sql | 4 +++- .../db/migration/V22__modify_api_test_environment.sql | 3 +++ .../main/resources/db/migration/V23__test_case_review.sql | 3 +++ .../main/resources/db/migration/V24__modify_test_plan.sql | 3 +++ .../db/migration/V25__add_base_system_properties.sql | 3 +++ .../src/main/resources/db/migration/V26__modify_notice.sql | 4 +++- .../main/resources/db/migration/V27__refactor_notice.sql | 4 +++- .../main/resources/db/migration/V28__modify_test_case.sql | 4 +++- .../resources/db/migration/V29__test_case_matainer.sql | 4 +++- .../main/resources/db/migration/V2__metersphere_ddl.sql | 3 +++ .../main/resources/db/migration/V30__test_case_file.sql | 3 +++ .../src/main/resources/db/migration/V31__message_task.sql | 4 +++- .../resources/db/migration/V32__test_case_prerequisite.sql | 4 +++- .../resources/db/migration/V33__modify_message_task.sql | 4 +++- .../src/main/resources/db/migration/V34__api_test_jar.sql | 3 +++ .../main/resources/db/migration/V35__modify_test_plan.sql | 4 +++- .../main/resources/db/migration/V36__add_messag_task.sql | 4 +++- .../main/resources/db/migration/V37__add_plan_index.sql | 4 +++- .../db/migration/V38__modify_message_task_test_id.sql | 4 +++- .../db/migration/V39__modify_message_task_create_time.sql | 4 +++- .../src/main/resources/db/migration/V3__init_data.sql | 3 +++ .../resources/db/migration/V40__test_case_node_add_pos.sql | 4 +++- .../src/main/resources/db/migration/V41__set_ui.sql | 4 +++- .../db/migration/V42__modify_load_test_report.sql | 4 +++- .../src/main/resources/db/migration/V43__add_role.sql | 4 +++- .../resources/db/migration/V44__project_add_zentao_id.sql | 4 +++- .../src/main/resources/db/migration/V45__modify_issues.sql | 4 +++- .../src/main/resources/db/migration/V47__api_data_view.sql | 3 +++ .../main/resources/db/migration/V48__notice_template.sql | 4 +++- .../resources/db/migration/V49__user_add_project_id.sql | 4 +++- .../src/main/resources/db/migration/V4__user_key.sql | 3 +++ .../src/main/resources/db/migration/V50__api_scenario.sql | 3 +++ .../main/resources/db/migration/V51__api_definition.sql | 3 +++ .../src/main/resources/db/migration/V52__test_plan_api.sql | 3 +++ .../resources/db/migration/V53__modify_api_scenario.sql | 4 +++- .../db/migration/V54__test_resource_pool_image.sql | 4 +++- .../db/migration/V55__modify_api_scenario_report.sql | 3 +++ .../resources/db/migration/V56__modify_api_module_pos.sql | 4 +++- .../db/migration/V57__init_api_definition_num.sql | 4 +++- .../src/main/resources/db/migration/V58__add_index.sql | 4 +++- .../db/migration/V59__test_plan_add_project_id.sql | 4 +++- .../src/main/resources/db/migration/V5__schedule.sql | 3 +++ .../db/migration/V60__modify_project_add_repeatable.sql | 4 +++- .../resources/db/migration/V61__modify_test_case_name.sql | 4 +++- .../db/migration/V62__add_test_plan_load_case.sql | 3 +++ .../src/main/resources/db/migration/V63__add_tag.sql | 4 +++- .../src/main/resources/db/migration/V64__auth_source.sql | 3 +++ .../resources/db/migration/V65__init_load_test_num.sql | 3 +++ .../resources/db/migration/V66__init_test_plan_report.sql | 3 +++ .../db/migration/V67__case_review_add_project_id.sql | 4 +++- .../resources/db/migration/V68__modify_api_test_case.sql | 3 +++ .../resources/db/migration/V69__swagger_url_project.sql | 3 +++ .../resources/db/migration/V6__api_test_environment.sql | 3 +++ .../db/migration/V70__modify_test_plan_report.sql | 4 +++- .../main/resources/db/migration/V71__modify_scenario.sql | 4 +++- .../db/migration/V72__modify_swagger_url_project.sql | 3 +++ .../db/migration/V73__modify_test_plan_api_scenario_id.sql | 3 +++ .../db/migration/V74__modify_schedule_message_task.sql | 3 +++ .../V75__modify_schedule_message_task_test_id.sql | 3 +++ .../db/migration/V77__modify_schedule_test_id.sql | 3 +++ .../src/main/resources/db/migration/V78__v1.8_release.sql | 3 +++ .../main/resources/db/migration/V79__v1.8.1_release.sql | 4 +++- .../main/resources/db/migration/V7__modify_user_table.sql | 4 +++- .../main/resources/db/migration/V80__v1.9.0_release.sql | 3 +++ .../main/resources/db/migration/V81__v1.9.1_release.sql | 3 +++ .../main/resources/db/migration/V82__v1.9.2_release.sql | 3 +++ .../main/resources/db/migration/V83__v1.9.3_release.sql | 3 +++ .../src/main/resources/db/migration/V84__v1.10_release.sql | 3 +++ .../db/migration/V85__v1.10_permission_refactor.sql | 4 +++- .../main/resources/db/migration/V86__v1.10.1_release.sql | 3 +++ .../main/resources/db/migration/V87__v1.10.2_release.sql | 3 +++ .../main/resources/db/migration/V88__v1.10.3_release.sql | 4 +++- .../main/resources/db/migration/V89__v1.10.4_release.sql | 4 +++- .../main/resources/db/migration/V8__modify_test_case.sql | 4 +++- .../main/resources/db/migration/V90__v1.10.5_release.sql | 4 +++- .../src/main/resources/db/migration/V91__v1.11_release.sql | 4 +++- .../main/resources/db/migration/V92__v1.11.2_release.sql | 3 +++ .../src/main/resources/db/migration/V93__v1.12_release.sql | 3 +++ .../main/resources/db/migration/V94__v1.12.1_release.sql | 3 +++ .../src/main/resources/db/migration/V95__v1.13_release.sql | 3 +++ .../main/resources/db/migration/V96__v1.13.1__release.sql | 3 +++ .../src/main/resources/db/migration/V97__v1.14_release.sql | 3 +++ .../main/resources/db/migration/V98__v1.14.1_release.sql | 3 +++ .../src/main/resources/db/migration/V99__v1.15_release.sql | 3 +++ .../resources/db/migration/V9__modify_report_result.sql | 3 +++ .../src/main/resources/db/migration/V2__2.3.0_release.sql | 5 +++++ .../src/main/resources/db/migration/V3__2.4.0_release.sql | 6 +++++- .../src/main/resources/db/migration/V4__2.6.0_release.sql | 5 +++++ 133 files changed, 412 insertions(+), 62 deletions(-) diff --git a/performance-test/backend/src/main/resources/db/migration/V2__2.3.0_release.sql b/performance-test/backend/src/main/resources/db/migration/V2__2.3.0_release.sql index c5bd6f3743..d7982adc47 100644 --- a/performance-test/backend/src/main/resources/db/migration/V2__2.3.0_release.sql +++ b/performance-test/backend/src/main/resources/db/migration/V2__2.3.0_release.sql @@ -1,5 +1,10 @@ +SET SESSION innodb_lock_wait_timeout = 7200; + ALTER TABLE load_test_report MODIFY name VARCHAR(255) NOT NULL; ALTER TABLE load_test_report - MODIFY test_name VARCHAR(255) NULL; \ No newline at end of file + MODIFY test_name VARCHAR(255) NULL; + + +SET SESSION innodb_lock_wait_timeout = DEFAULT; \ No newline at end of file diff --git a/performance-test/backend/src/main/resources/db/migration/V3__2.4.1_release.sql b/performance-test/backend/src/main/resources/db/migration/V3__2.4.1_release.sql index 6da879cca0..3122ade159 100644 --- a/performance-test/backend/src/main/resources/db/migration/V3__2.4.1_release.sql +++ b/performance-test/backend/src/main/resources/db/migration/V3__2.4.1_release.sql @@ -1,3 +1,4 @@ +SET SESSION innodb_lock_wait_timeout = 7200; -- -- 增加一个索引 SELECT IF(EXISTS(SELECT DISTINCT index_name @@ -10,4 +11,7 @@ SELECT IF(EXISTS(SELECT DISTINCT index_name INTO @a; PREPARE stmt1 FROM @a; EXECUTE stmt1; -DEALLOCATE PREPARE stmt1; \ No newline at end of file +DEALLOCATE PREPARE stmt1; + + +SET SESSION innodb_lock_wait_timeout = DEFAULT; \ No newline at end of file diff --git a/report-stat/backend/src/main/resources/db/migration/V2__2.3.0_release.sql b/report-stat/backend/src/main/resources/db/migration/V2__2.3.0_release.sql index 0d0bd4f9cf..eae5c0747a 100644 --- a/report-stat/backend/src/main/resources/db/migration/V2__2.3.0_release.sql +++ b/report-stat/backend/src/main/resources/db/migration/V2__2.3.0_release.sql @@ -1,2 +1,6 @@ +SET SESSION innodb_lock_wait_timeout = 7200; + -- 更改状态 -update enterprise_test_report set status ='SEND_FAILED' where status = 'SEND_FAILD'; \ No newline at end of file +update enterprise_test_report set status ='SEND_FAILED' where status = 'SEND_FAILD'; + +SET SESSION innodb_lock_wait_timeout = DEFAULT; \ No newline at end of file diff --git a/system-setting/backend/src/main/resources/db/migration/V100__v1.15.2_release.sql b/system-setting/backend/src/main/resources/db/migration/V100__v1.15.2_release.sql index abf83df77b..790ab4c15f 100644 --- a/system-setting/backend/src/main/resources/db/migration/V100__v1.15.2_release.sql +++ b/system-setting/backend/src/main/resources/db/migration/V100__v1.15.2_release.sql @@ -1,3 +1,4 @@ +SET SESSION innodb_lock_wait_timeout = 7200; -- ws admin insert into user_group_permission (id, group_id, permission_id, module_id) values (UUID(), 'ws_admin', 'WORKSPACE_PROJECT_ENVIRONMENT:READ+CREATE_GROUP', 'WORKSPACE_PROJECT_ENVIRONMENT'); @@ -19,3 +20,5 @@ values (UUID(), 'admin', 'SYSTEM_PLUGIN:UPLOAD', 'SYSTEM_PLUGIN'); insert into user_group_permission (id, group_id, permission_id, module_id) values (UUID(), 'admin', 'SYSTEM_PLUGIN:DEL', 'SYSTEM_PLUGIN'); + +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V101__v1.15.3_release.sql b/system-setting/backend/src/main/resources/db/migration/V101__v1.15.3_release.sql index ac64067578..68e55a4e23 100644 --- a/system-setting/backend/src/main/resources/db/migration/V101__v1.15.3_release.sql +++ b/system-setting/backend/src/main/resources/db/migration/V101__v1.15.3_release.sql @@ -1,4 +1,6 @@ +SET SESSION innodb_lock_wait_timeout = 7200; -- 修复数据 update test_plan set repeat_case = 0 where repeat_case is null; -alter table environment_group_project drop column description; \ No newline at end of file +alter table environment_group_project drop column description; +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V102__v1.15.5_release.sql b/system-setting/backend/src/main/resources/db/migration/V102__v1.15.5_release.sql index 748ca1c6cb..1cecdab340 100644 --- a/system-setting/backend/src/main/resources/db/migration/V102__v1.15.5_release.sql +++ b/system-setting/backend/src/main/resources/db/migration/V102__v1.15.5_release.sql @@ -1,2 +1,4 @@ +SET SESSION innodb_lock_wait_timeout = 7200; ALTER TABLE api_definition_exec_result - MODIFY COLUMN name VARCHAR (255); \ No newline at end of file + MODIFY COLUMN name VARCHAR (255); +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V103__v1.16_release.sql b/system-setting/backend/src/main/resources/db/migration/V103__v1.16_release.sql index 89e68a2777..e0e259f7d5 100644 --- a/system-setting/backend/src/main/resources/db/migration/V103__v1.16_release.sql +++ b/system-setting/backend/src/main/resources/db/migration/V103__v1.16_release.sql @@ -1,3 +1,4 @@ +SET SESSION innodb_lock_wait_timeout = 7200; -- 新增字段 ALTER TABLE `swagger_url_project` ADD COLUMN `config` longtext COMMENT '鉴权配置信息' AFTER `mode_id`; @@ -105,3 +106,5 @@ CREATE TABLE IF NOT EXISTS `api_execution_queue_detail` ALTER TABLE load_test MODIFY name VARCHAR(255) NOT NULL COMMENT 'Test name'; + +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V104__v1.16.3_release.sql b/system-setting/backend/src/main/resources/db/migration/V104__v1.16.3_release.sql index e2923a6d03..2393a28699 100644 --- a/system-setting/backend/src/main/resources/db/migration/V104__v1.16.3_release.sql +++ b/system-setting/backend/src/main/resources/db/migration/V104__v1.16.3_release.sql @@ -1,3 +1,4 @@ +SET SESSION innodb_lock_wait_timeout = 7200; CREATE TABLE IF NOT EXISTS `error_report_library` ( `id` varchar(50) NOT NULL COMMENT 'Test ID', `project_id` varchar(50) NOT NULL COMMENT 'Project ID this report belongs to', @@ -26,4 +27,5 @@ VALUES (uuid(), 'admin', 'PROJECT_ERROR_REPORT_LIBRARY:READ+CREATE', 'PROJECT_ER INSERT INTO user_group_permission (id, group_id, permission_id, module_id) VALUES (uuid(), 'admin', 'PROJECT_ERROR_REPORT_LIBRARY:READ+EDIT', 'PROJECT_ERROR_REPORT_LIBRARY'); INSERT INTO user_group_permission (id, group_id, permission_id, module_id) -VALUES (uuid(), 'admin', 'PROJECT_ERROR_REPORT_LIBRARY:READ+DELETE', 'PROJECT_ERROR_REPORT_LIBRARY'); \ No newline at end of file +VALUES (uuid(), 'admin', 'PROJECT_ERROR_REPORT_LIBRARY:READ+DELETE', 'PROJECT_ERROR_REPORT_LIBRARY'); +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V105__v1.16.5_release.sql b/system-setting/backend/src/main/resources/db/migration/V105__v1.16.5_release.sql index 70e69ee6c3..27beb05fdb 100644 --- a/system-setting/backend/src/main/resources/db/migration/V105__v1.16.5_release.sql +++ b/system-setting/backend/src/main/resources/db/migration/V105__v1.16.5_release.sql @@ -1,6 +1,9 @@ +SET SESSION innodb_lock_wait_timeout = 7200; ALTER TABLE test_plan_report_content ADD plan_scenario_report_struct longtext NULL; ALTER TABLE test_plan_report_content ADD plan_api_case_report_struct longtext NULL; ALTER TABLE test_plan_report_content ADD plan_load_case_report_struct longtext NULL; ALTER TABLE api_execution_queue ADD failure TINYINT(1); CREATE INDEX api_scenario_report_result_report_id_IDX ON api_scenario_report_result (report_id); + +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V106__v1.17_release.sql b/system-setting/backend/src/main/resources/db/migration/V106__v1.17_release.sql index 21b575263c..bcfd73c5ae 100644 --- a/system-setting/backend/src/main/resources/db/migration/V106__v1.17_release.sql +++ b/system-setting/backend/src/main/resources/db/migration/V106__v1.17_release.sql @@ -1,3 +1,4 @@ +SET SESSION innodb_lock_wait_timeout = 7200; -- permission INSERT INTO user_group_permission (id, group_id, permission_id, module_id) VALUES ('36c05551-5195-4cb8-98d4-737f15ffe0bb', 'project_admin', 'PROJECT_VERSION:READ+DELETE', 'PROJECT_VERSION'); @@ -241,3 +242,5 @@ WHERE custom_num IS NULL + +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V107__v1.17.2_release.sql b/system-setting/backend/src/main/resources/db/migration/V107__v1.17.2_release.sql index 33ae82e919..d2257c4c80 100644 --- a/system-setting/backend/src/main/resources/db/migration/V107__v1.17.2_release.sql +++ b/system-setting/backend/src/main/resources/db/migration/V107__v1.17.2_release.sql @@ -1 +1,3 @@ -alter table api_execution_queue_detail add index queue_id_test_id_index(queue_id,test_id); \ No newline at end of file +SET SESSION innodb_lock_wait_timeout = 7200; +alter table api_execution_queue_detail add index queue_id_test_id_index(queue_id,test_id); +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V108__v1.18_release.sql b/system-setting/backend/src/main/resources/db/migration/V108__v1.18_release.sql index 82a6730ce1..7c4ae6416f 100644 --- a/system-setting/backend/src/main/resources/db/migration/V108__v1.18_release.sql +++ b/system-setting/backend/src/main/resources/db/migration/V108__v1.18_release.sql @@ -1,3 +1,4 @@ +SET SESSION innodb_lock_wait_timeout = 7200; ALTER TABLE `operating_log` ADD INDEX oper_time_index ( `oper_time` ); CREATE TABLE `operating_log_resource` @@ -179,3 +180,5 @@ set t.project_id = atc.project_id where atc.id = t.resource_id; update api_scenario_report set report_type = 'SCENARIO_INTEGRATED' where scenario_id like '[%'; update api_scenario_report set report_type = 'SCENARIO_INDEPENDENT' where report_type is null; + +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V109__v1.18.1_release.sql b/system-setting/backend/src/main/resources/db/migration/V109__v1.18.1_release.sql index 56166b1a75..ea728a0b4f 100644 --- a/system-setting/backend/src/main/resources/db/migration/V109__v1.18.1_release.sql +++ b/system-setting/backend/src/main/resources/db/migration/V109__v1.18.1_release.sql @@ -1,6 +1,9 @@ +SET SESSION innodb_lock_wait_timeout = 7200; ALTER TABLE `api_definition_exec_result` ADD INDEX projectIdIndex ( `project_id` ); ALTER TABLE `api_scenario_report` ADD INDEX projectIdIndex ( `project_id` ); ALTER TABLE `api_scenario_report` ADD INDEX projectIdexectypeIndex ( `project_id`,`execute_type` ); -- module management INSERT INTO system_parameter (param_key, param_value, type, sort) VALUES ('metersphere.module.workstation', 'ENABLE', 'text', 1); + +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V10__modify_schedule.sql b/system-setting/backend/src/main/resources/db/migration/V10__modify_schedule.sql index db4ba45fa5..cc2b6d05c1 100644 --- a/system-setting/backend/src/main/resources/db/migration/V10__modify_schedule.sql +++ b/system-setting/backend/src/main/resources/db/migration/V10__modify_schedule.sql @@ -1,3 +1,4 @@ +SET SESSION innodb_lock_wait_timeout = 7200; ALTER TABLE `schedule` ADD `workspace_id` varchar(50) NOT NULL COMMENT 'Workspace ID this schedule belongs to'; ALTER TABLE `schedule` ADD `create_time` bigint(13) NULL COMMENT 'Create timestamp'; ALTER TABLE `schedule` ADD `update_time` bigint(13) NULL COMMENT 'Update timestamp'; @@ -14,4 +15,5 @@ ON api_test.project_id = project.id SET schedule.workspace_id = result.workspace_id, schedule.create_time = result.create_time, schedule.update_time = result.update_time -WHERE schedule.resource_id = result.resource_id; \ No newline at end of file +WHERE schedule.resource_id = result.resource_id; +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V110__v1.19_release.sql b/system-setting/backend/src/main/resources/db/migration/V110__v1.19_release.sql index 920a9f394b..0607406272 100644 --- a/system-setting/backend/src/main/resources/db/migration/V110__v1.19_release.sql +++ b/system-setting/backend/src/main/resources/db/migration/V110__v1.19_release.sql @@ -1,3 +1,4 @@ +SET SESSION innodb_lock_wait_timeout = 7200; DROP PROCEDURE IF EXISTS project_api_appl; DELIMITER // @@ -701,4 +702,5 @@ WHERE group_id = 'project_app_manager'; ALTER TABLE `test_plan_report_content` ADD COLUMN `un_execute_cases` LONGTEXT COMMENT '未执行状态接口用例'; -ALTER TABLE `test_plan_report_content` ADD COLUMN `un_execute_scenarios` LONGTEXT COMMENT '未执行状态场景用例'; \ No newline at end of file +ALTER TABLE `test_plan_report_content` ADD COLUMN `un_execute_scenarios` LONGTEXT COMMENT '未执行状态场景用例'; +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V111__v1.19.1_release.sql b/system-setting/backend/src/main/resources/db/migration/V111__v1.19.1_release.sql index 6cb04b73b2..651da277af 100644 --- a/system-setting/backend/src/main/resources/db/migration/V111__v1.19.1_release.sql +++ b/system-setting/backend/src/main/resources/db/migration/V111__v1.19.1_release.sql @@ -1,3 +1,4 @@ +SET SESSION innodb_lock_wait_timeout = 7200; DROP PROCEDURE IF EXISTS schema_change_api; DELIMITER // @@ -121,3 +122,5 @@ CREATE PROCEDURE schema_change() BEGIN END// DELIMITER ; CALL schema_change(); + +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V112__v1.19.2_release.sql b/system-setting/backend/src/main/resources/db/migration/V112__v1.19.2_release.sql index 8d54c82891..4bf515f09a 100644 --- a/system-setting/backend/src/main/resources/db/migration/V112__v1.19.2_release.sql +++ b/system-setting/backend/src/main/resources/db/migration/V112__v1.19.2_release.sql @@ -1,3 +1,4 @@ +SET SESSION innodb_lock_wait_timeout = 7200; ALTER TABLE test_plan MODIFY name VARCHAR(128) NOT NULL COMMENT 'Plan name'; @@ -14,3 +15,5 @@ DELIMITER ; CALL schema_change_api(); + +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V113__v1.19.3_release.sql b/system-setting/backend/src/main/resources/db/migration/V113__v1.19.3_release.sql index 4b74e91edb..6e4802668b 100644 --- a/system-setting/backend/src/main/resources/db/migration/V113__v1.19.3_release.sql +++ b/system-setting/backend/src/main/resources/db/migration/V113__v1.19.3_release.sql @@ -1,3 +1,4 @@ +SET SESSION innodb_lock_wait_timeout = 7200; ALTER TABLE test_plan_report MODIFY name varchar(128) NULL COMMENT 'name'; @@ -39,4 +40,5 @@ CREATE PROCEDURE schema_change_api() BEGIN END IF; END// DELIMITER ; -CALL schema_change_api(); \ No newline at end of file +CALL schema_change_api(); +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V115__1.20__release.sql b/system-setting/backend/src/main/resources/db/migration/V115__1.20__release.sql index f813ad1eae..f538a4c842 100644 --- a/system-setting/backend/src/main/resources/db/migration/V115__1.20__release.sql +++ b/system-setting/backend/src/main/resources/db/migration/V115__1.20__release.sql @@ -1,3 +1,4 @@ +SET SESSION innodb_lock_wait_timeout = 7200; CREATE TABLE `ui_scenario_module` ( `id` varchar(50) NOT NULL COMMENT 'ui scenario node ID', @@ -306,3 +307,5 @@ UPDATE system_parameter SET param_value = 'http://local-selenium-grid:4444' WHER + +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V116__1.20.2__release.sql b/system-setting/backend/src/main/resources/db/migration/V116__1.20.2__release.sql index 0e7b1309f2..760dd48e1d 100644 --- a/system-setting/backend/src/main/resources/db/migration/V116__1.20.2__release.sql +++ b/system-setting/backend/src/main/resources/db/migration/V116__1.20.2__release.sql @@ -1,3 +1,4 @@ +SET SESSION innodb_lock_wait_timeout = 7200; ALTER TABLE `user` ADD selenium_server varchar(255) DEFAULT ''; -- start 2022.05.11 jar包支持项目级别和工作空间级别可见 @@ -13,4 +14,5 @@ DELETE FROM jar_config WHERE resource_id = ''; -- end -- V116_1-20-2_user_group_permission 插入UI配置权限给项目管理员 -INSERT INTO user_group_permission (id, group_id, permission_id, module_id) VALUES (uuid(), 'project_admin', 'PERSONAL_INFORMATION:READ+UI_SETTING', 'PERSONAL_INFORMATION'); \ No newline at end of file +INSERT INTO user_group_permission (id, group_id, permission_id, module_id) VALUES (uuid(), 'project_admin', 'PERSONAL_INFORMATION:READ+UI_SETTING', 'PERSONAL_INFORMATION'); +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V117__1.20.3__release.sql b/system-setting/backend/src/main/resources/db/migration/V117__1.20.3__release.sql index 3a8be7372d..0b9be32598 100644 --- a/system-setting/backend/src/main/resources/db/migration/V117__1.20.3__release.sql +++ b/system-setting/backend/src/main/resources/db/migration/V117__1.20.3__release.sql @@ -1,3 +1,4 @@ +SET SESSION innodb_lock_wait_timeout = 7200; -- V117_v1-20-3_ui-element-permission -- start @@ -16,3 +17,5 @@ values (UUID(), 'project_member', 'PROJECT_UI_ELEMENT:READ+IMPORT', 'PROJECT_UI_ insert into user_group_permission (id, group_id, permission_id, module_id) values (UUID(), 'project_member', 'PROJECT_UI_ELEMENT:READ+EXPORT', 'PROJECT_UI_ELEMENT'); -- end + +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V118__1.20.4__release.sql b/system-setting/backend/src/main/resources/db/migration/V118__1.20.4__release.sql index d4bc381602..dd326f1225 100644 --- a/system-setting/backend/src/main/resources/db/migration/V118__1.20.4__release.sql +++ b/system-setting/backend/src/main/resources/db/migration/V118__1.20.4__release.sql @@ -1,3 +1,4 @@ +SET SESSION innodb_lock_wait_timeout = 7200; -- 初始化 sql -- 创建 性能测试报告和文件的关联 -- start @@ -48,4 +49,5 @@ DELIMITER ; CALL load_test_report_file_add(); DROP PROCEDURE IF EXISTS load_test_report_file_add; --- end \ No newline at end of file +-- end +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V119__1.20.5__release.sql b/system-setting/backend/src/main/resources/db/migration/V119__1.20.5__release.sql index 8fce5b21e9..f3a05c29dc 100644 --- a/system-setting/backend/src/main/resources/db/migration/V119__1.20.5__release.sql +++ b/system-setting/backend/src/main/resources/db/migration/V119__1.20.5__release.sql @@ -1,3 +1,4 @@ +SET SESSION innodb_lock_wait_timeout = 7200; -- 初始化 sql -- start V119_1-20-5_ws_permission INSERT INTO user_group_permission (id, group_id, permission_id, module_id) @@ -53,4 +54,5 @@ VALUES (UUID(), 'project_member', 'PROJECT_TRACK_CASE:READ+GENERATE_DEPENDENCIES INSERT INTO user_group_permission (id, group_id, permission_id, module_id) VALUES (UUID(), 'project_member', 'PROJECT_TRACK_CASE:READ+BATCH_ADD_PUBLIC', 'PROJECT_TRACK_CASE'); --- end \ No newline at end of file +-- end +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V11__add_test_case.sql b/system-setting/backend/src/main/resources/db/migration/V11__add_test_case.sql index 0d2aaf12c8..21d3a6b0bc 100644 --- a/system-setting/backend/src/main/resources/db/migration/V11__add_test_case.sql +++ b/system-setting/backend/src/main/resources/db/migration/V11__add_test_case.sql @@ -1,2 +1,5 @@ +SET SESSION innodb_lock_wait_timeout = 7200; ALTER TABLE test_case ADD other_test_name varchar(200); + +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V120__1.20.6__release.sql b/system-setting/backend/src/main/resources/db/migration/V120__1.20.6__release.sql index bd7158b20d..a626085e67 100644 --- a/system-setting/backend/src/main/resources/db/migration/V120__1.20.6__release.sql +++ b/system-setting/backend/src/main/resources/db/migration/V120__1.20.6__release.sql @@ -1,3 +1,4 @@ +SET SESSION innodb_lock_wait_timeout = 7200; -- 初始化 sql -- V120_1-20-6_test_case_modify -- test_case 列表查询性能优化 @@ -28,4 +29,5 @@ SET test_case_review_test_case.is_del = 1; -- V120_1-20-6_log -- 日志记录表添加索引 ALTER TABLE `operating_log` - ADD INDEX oper_project_id (`project_id`); \ No newline at end of file + ADD INDEX oper_project_id (`project_id`); +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V121__1.20.8__release.sql b/system-setting/backend/src/main/resources/db/migration/V121__1.20.8__release.sql index 23fe845c4f..5ce57cab59 100644 --- a/system-setting/backend/src/main/resources/db/migration/V121__1.20.8__release.sql +++ b/system-setting/backend/src/main/resources/db/migration/V121__1.20.8__release.sql @@ -1,3 +1,4 @@ +SET SESSION innodb_lock_wait_timeout = 7200; -- 初始化 sql -- V121_1-20-8_clear_test_case_node @@ -10,3 +11,5 @@ DELETE FROM test_case_node WHERE `level` = 0; -- 由于公共用例查询SQL排序字段未使用原本的联合索引 -- 需新加一个联合索引 ALTER TABLE test_case ADD INDEX test_case_public_order_index(`case_public`, `order`); + +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V122__1.20.10__release.sql b/system-setting/backend/src/main/resources/db/migration/V122__1.20.10__release.sql index d77f0b5533..4bdebff0d0 100644 --- a/system-setting/backend/src/main/resources/db/migration/V122__1.20.10__release.sql +++ b/system-setting/backend/src/main/resources/db/migration/V122__1.20.10__release.sql @@ -1,5 +1,8 @@ +SET SESSION innodb_lock_wait_timeout = 7200; -- 初始化 sql -- V122_2-1-0_swagger_url_project ALTER TABLE swagger_url_project ADD COLUMN cover_module TINYINT(1) DEFAULT 0 COMMENT '是否覆盖模块'; update swagger_url_project set mode_id='incrementalMerge' where mode_id='不覆盖'; + +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V125__2.0.0_ddl__release.sql b/system-setting/backend/src/main/resources/db/migration/V125__2.0.0_ddl__release.sql index d567207b98..b4f3eaed00 100644 --- a/system-setting/backend/src/main/resources/db/migration/V125__2.0.0_ddl__release.sql +++ b/system-setting/backend/src/main/resources/db/migration/V125__2.0.0_ddl__release.sql @@ -1,3 +1,4 @@ +SET SESSION innodb_lock_wait_timeout = 7200; -- 初始化V2.0.0 -- V117_v1-20-3_custom_field -- 存储用例的自定义字段值 @@ -251,3 +252,5 @@ CREATE TABLE IF NOT EXISTS `attachment_module_relation` COLLATE = utf8mb4_general_ci; ALTER TABLE test_plan_report_content ADD COLUMN `ui_all_cases` LONGTEXT COMMENT 'ui all cases (JSON format)'; + +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V126__2.0.0_dml__release.sql b/system-setting/backend/src/main/resources/db/migration/V126__2.0.0_dml__release.sql index 4e5b29b09b..dee1bac5b2 100644 --- a/system-setting/backend/src/main/resources/db/migration/V126__2.0.0_dml__release.sql +++ b/system-setting/backend/src/main/resources/db/migration/V126__2.0.0_dml__release.sql @@ -1,3 +1,4 @@ +SET SESSION innodb_lock_wait_timeout = 7200; -- -- V2_sync_supplementary_data -- 查出所有不重复的项目ID 循环项目ID 给 project_application 表设置默认值 @@ -269,3 +270,5 @@ VALUES (UUID(), 'project_admin', 'PROJECT_TRACK_CASE:READ+BATCH_LINK_DEMAND', 'P INSERT INTO user_group_permission (id, group_id, permission_id, module_id) VALUES (UUID(), 'project_member', 'PROJECT_TRACK_CASE:READ+BATCH_LINK_DEMAND', 'PROJECT_TRACK_CASE'); + +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V127__2.0.1__release.sql b/system-setting/backend/src/main/resources/db/migration/V127__2.0.1__release.sql index 932597eaae..2b0d846822 100644 --- a/system-setting/backend/src/main/resources/db/migration/V127__2.0.1__release.sql +++ b/system-setting/backend/src/main/resources/db/migration/V127__2.0.1__release.sql @@ -1,3 +1,4 @@ +SET SESSION innodb_lock_wait_timeout = 7200; -- -- V127__2-0-1_add_test_plan_ui_fail_cases ALTER TABLE test_plan_report_content ADD COLUMN `ui_failure_cases` LONGTEXT COMMENT 'ui failure cases (JSON format)'; @@ -5,3 +6,5 @@ ALTER TABLE test_plan_report_content ADD COLUMN `ui_failure_cases` LONGTEXT COMM -- -- V128__2-0-1_update_api_scenario_last_result UPDATE api_scenario set last_result='' where last_result IS NULL; + +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V129__2.1.0__release.sql b/system-setting/backend/src/main/resources/db/migration/V129__2.1.0__release.sql index 4d93fe04c9..fab0536593 100644 --- a/system-setting/backend/src/main/resources/db/migration/V129__2.1.0__release.sql +++ b/system-setting/backend/src/main/resources/db/migration/V129__2.1.0__release.sql @@ -1,3 +1,4 @@ +SET SESSION innodb_lock_wait_timeout = 7200; -- V128__2-1-0_update_api_scenario_load_report -- ALTER TABLE `api_definition_exec_result` @@ -236,3 +237,5 @@ CREATE TABLE `file_module` ) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_general_ci; + +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V12__modify_load_test_report.sql b/system-setting/backend/src/main/resources/db/migration/V12__modify_load_test_report.sql index bae127a5ba..5ff30f4583 100644 --- a/system-setting/backend/src/main/resources/db/migration/V12__modify_load_test_report.sql +++ b/system-setting/backend/src/main/resources/db/migration/V12__modify_load_test_report.sql @@ -1,2 +1,4 @@ +SET SESSION innodb_lock_wait_timeout = 7200; ALTER TABLE load_test_report - ADD load_configuration LONGTEXT NULL; \ No newline at end of file + ADD load_configuration LONGTEXT NULL; +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V130__2.2.0__release.sql b/system-setting/backend/src/main/resources/db/migration/V130__2.2.0__release.sql index bd13acb80c..e4cd041be6 100644 --- a/system-setting/backend/src/main/resources/db/migration/V130__2.2.0__release.sql +++ b/system-setting/backend/src/main/resources/db/migration/V130__2.2.0__release.sql @@ -1,3 +1,4 @@ +SET SESSION innodb_lock_wait_timeout = 7200; -- v2_2 init -- v2_2_init_ui_share_report_time -- 工单名称: v2_2_init_ui_share_report_time @@ -156,3 +157,5 @@ ALTER TABLE `ui_scenario_module` ADD COLUMN scenario_type VARCHAR(100) NOT NULL ALTER TABLE `attachment_module_relation` MODIFY COLUMN attachment_id VARCHAR(50) NULL; ALTER TABLE `attachment_module_relation` ADD COLUMN file_metadata_ref_id VARCHAR(50) DEFAULT NULL COMMENT 'FILE ASSOCIATION ID'; + +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V131__2.3.0__release.sql b/system-setting/backend/src/main/resources/db/migration/V131__2.3.0__release.sql index 8f4aa089dc..38475859c5 100644 --- a/system-setting/backend/src/main/resources/db/migration/V131__2.3.0__release.sql +++ b/system-setting/backend/src/main/resources/db/migration/V131__2.3.0__release.sql @@ -1,3 +1,4 @@ +SET SESSION innodb_lock_wait_timeout = 7200; -- v2_3 init -- V2_3_micro_service_module -- 工单名称: V2_3_micro_service_module @@ -35,4 +36,5 @@ SELECT UUID(), id, 'PROJECT_ERROR_REPORT_LIBRARY:READ+BATCH_DELETE', 'PROJECT_ER FROM `group` WHERE type = 'PROJECT' AND `group`.id IN - (SELECT group_id FROM user_group_permission WHERE permission_id = 'PROJECT_ERROR_REPORT_LIBRARY:READ'); \ No newline at end of file + (SELECT group_id FROM user_group_permission WHERE permission_id = 'PROJECT_ERROR_REPORT_LIBRARY:READ'); +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V132__2.4.0_release.sql b/system-setting/backend/src/main/resources/db/migration/V132__2.4.0_release.sql index 53c9077e21..e738e314f1 100644 --- a/system-setting/backend/src/main/resources/db/migration/V132__2.4.0_release.sql +++ b/system-setting/backend/src/main/resources/db/migration/V132__2.4.0_release.sql @@ -1,3 +1,4 @@ +SET SESSION innodb_lock_wait_timeout = 7200; -- v2.4.0 init -- -- 通知表时间加索引 @@ -19,4 +20,5 @@ WHERE type = 'PROJECT' -- 是否是企业版插件 ALTER TABLE plugin ADD xpack TINYINT(1) NULL COMMENT 'Is xpack plugin'; -- 插件的使用场景 -ALTER TABLE plugin ADD scenario varchar(50) NOT NULL COMMENT 'Plugin usage scenarios'; \ No newline at end of file +ALTER TABLE plugin ADD scenario varchar(50) NOT NULL COMMENT 'Plugin usage scenarios'; +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V133__2.5.0_release.sql b/system-setting/backend/src/main/resources/db/migration/V133__2.5.0_release.sql index 04987ab6f9..5d06d3aaaa 100644 --- a/system-setting/backend/src/main/resources/db/migration/V133__2.5.0_release.sql +++ b/system-setting/backend/src/main/resources/db/migration/V133__2.5.0_release.sql @@ -1,3 +1,4 @@ +SET SESSION innodb_lock_wait_timeout = 7200; -- v2_5_modify_workspace_name_length -- 创建人 liyuhao -- 创建时间 2022-11-29 13:19:51 @@ -108,3 +109,5 @@ DROP PROCEDURE IF EXISTS init_super_permission; INSERT INTO `group` (id, name, description, `system`, type, create_time, update_time, creator, scope_id) VALUES ('super_group', '超级管理员(系统)', '拥有系统全部工作空间以及项目的操作权限', 1, 'SYSTEM', UNIX_TIMESTAMP() * 1000, UNIX_TIMESTAMP() * 1000, 'system', 'system'); + +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V134__2.6.0_release.sql b/system-setting/backend/src/main/resources/db/migration/V134__2.6.0_release.sql index c9cd3240f0..7dfb40f2da 100644 --- a/system-setting/backend/src/main/resources/db/migration/V134__2.6.0_release.sql +++ b/system-setting/backend/src/main/resources/db/migration/V134__2.6.0_release.sql @@ -1,2 +1,4 @@ +SET SESSION innodb_lock_wait_timeout = 7200; -- 清理超级用户组权限信息,改为默认拥有全部权限 -delete from user_group_permission where group_id = 'super_group'; \ No newline at end of file +delete from user_group_permission where group_id = 'super_group'; +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V13__service_integration.sql b/system-setting/backend/src/main/resources/db/migration/V13__service_integration.sql index 80118df1ad..b860830a4b 100644 --- a/system-setting/backend/src/main/resources/db/migration/V13__service_integration.sql +++ b/system-setting/backend/src/main/resources/db/migration/V13__service_integration.sql @@ -1,3 +1,4 @@ +SET SESSION innodb_lock_wait_timeout = 7200; create table service_integration ( id varchar(50) not null, @@ -29,3 +30,5 @@ create table if not exists issues lastmodify varchar(50) null, platform varchar(50) null ) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE utf8mb4_general_ci; + +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V14__modify_project.sql b/system-setting/backend/src/main/resources/db/migration/V14__modify_project.sql index ce10533ef4..d912e062c1 100644 --- a/system-setting/backend/src/main/resources/db/migration/V14__modify_project.sql +++ b/system-setting/backend/src/main/resources/db/migration/V14__modify_project.sql @@ -1,2 +1,4 @@ +SET SESSION innodb_lock_wait_timeout = 7200; alter table project add tapd_id varchar(50) null; -alter table project add jira_key varchar(50) null; \ No newline at end of file +alter table project add jira_key varchar(50) null; +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V15__add_quota.sql b/system-setting/backend/src/main/resources/db/migration/V15__add_quota.sql index 814145b2fe..b773c4581e 100644 --- a/system-setting/backend/src/main/resources/db/migration/V15__add_quota.sql +++ b/system-setting/backend/src/main/resources/db/migration/V15__add_quota.sql @@ -1,3 +1,4 @@ +SET SESSION innodb_lock_wait_timeout = 7200; CREATE TABLE IF NOT EXISTS `quota` ( `id` varchar(50) NOT NULL, @@ -12,3 +13,5 @@ CREATE TABLE IF NOT EXISTS `quota` `update_time` bigint(13) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE utf8mb4_general_ci; + +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V16__modify_test_case_path.sql b/system-setting/backend/src/main/resources/db/migration/V16__modify_test_case_path.sql index a354291d33..94414750eb 100644 --- a/system-setting/backend/src/main/resources/db/migration/V16__modify_test_case_path.sql +++ b/system-setting/backend/src/main/resources/db/migration/V16__modify_test_case_path.sql @@ -1 +1,4 @@ +SET SESSION innodb_lock_wait_timeout = 7200; ALTER TABLE test_case MODIFY COLUMN node_path varchar(999) NOT NULL COMMENT 'Node path this case belongs to' ; + +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V17__test_plan_project.sql b/system-setting/backend/src/main/resources/db/migration/V17__test_plan_project.sql index 5e89c8da95..954c496b71 100644 --- a/system-setting/backend/src/main/resources/db/migration/V17__test_plan_project.sql +++ b/system-setting/backend/src/main/resources/db/migration/V17__test_plan_project.sql @@ -1,3 +1,4 @@ +SET SESSION innodb_lock_wait_timeout = 7200; create table if not exists test_plan_project ( test_plan_id varchar(50) null, @@ -7,3 +8,5 @@ create table if not exists test_plan_project ) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE utf8mb4_general_ci; insert into test_plan_project(test_plan_id, project_id) select id test_plan_id, project_id project_id from test_plan; + +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V18__notice.sql b/system-setting/backend/src/main/resources/db/migration/V18__notice.sql index b2abbe69b7..89f66d1e16 100644 --- a/system-setting/backend/src/main/resources/db/migration/V18__notice.sql +++ b/system-setting/backend/src/main/resources/db/migration/V18__notice.sql @@ -1,3 +1,4 @@ +SET SESSION innodb_lock_wait_timeout = 7200; CREATE TABLE IF NOT EXISTS `notice`( `EVENT` VARCHAR(100) NOT NULL, `TEST_ID` VARCHAR(100) NOT NULL, @@ -6,3 +7,5 @@ CREATE TABLE IF NOT EXISTS `notice`( `ENABLE` VARCHAR(40) NOT NULL ) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE utf8mb4_general_ci; + +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V19__add_api_test_environment.sql b/system-setting/backend/src/main/resources/db/migration/V19__add_api_test_environment.sql index d21de3e4e7..126614d157 100644 --- a/system-setting/backend/src/main/resources/db/migration/V19__add_api_test_environment.sql +++ b/system-setting/backend/src/main/resources/db/migration/V19__add_api_test_environment.sql @@ -1 +1,3 @@ -ALTER TABLE `api_test_environment` ADD `hosts` longtext COMMENT 'hosts '; \ No newline at end of file +SET SESSION innodb_lock_wait_timeout = 7200; +ALTER TABLE `api_test_environment` ADD `hosts` longtext COMMENT 'hosts '; +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V20__add_license.sql b/system-setting/backend/src/main/resources/db/migration/V20__add_license.sql index a5e68aab0f..c0415450c1 100644 --- a/system-setting/backend/src/main/resources/db/migration/V20__add_license.sql +++ b/system-setting/backend/src/main/resources/db/migration/V20__add_license.sql @@ -1,3 +1,4 @@ +SET SESSION innodb_lock_wait_timeout = 7200; CREATE TABLE `license` ( `id` varchar(50) NOT NULL COMMENT 'ID', `create_time` bigint(13) NOT NULL COMMENT 'Create timestamp', @@ -5,3 +6,5 @@ CREATE TABLE `license` ( `license_code` longtext DEFAULT NULL COMMENT 'license_code', PRIMARY KEY (`id`) ) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE utf8mb4_general_ci; + +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V21__modify_test_plan.sql b/system-setting/backend/src/main/resources/db/migration/V21__modify_test_plan.sql index a8e42eafde..7ae9ff3a16 100644 --- a/system-setting/backend/src/main/resources/db/migration/V21__modify_test_plan.sql +++ b/system-setting/backend/src/main/resources/db/migration/V21__modify_test_plan.sql @@ -1 +1,3 @@ -alter table test_plan drop column project_id; \ No newline at end of file +SET SESSION innodb_lock_wait_timeout = 7200; +alter table test_plan drop column project_id; +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V22__modify_api_test_environment.sql b/system-setting/backend/src/main/resources/db/migration/V22__modify_api_test_environment.sql index de866f5cb1..34173475a4 100644 --- a/system-setting/backend/src/main/resources/db/migration/V22__modify_api_test_environment.sql +++ b/system-setting/backend/src/main/resources/db/migration/V22__modify_api_test_environment.sql @@ -1,4 +1,7 @@ +SET SESSION innodb_lock_wait_timeout = 7200; ALTER TABLE api_test_environment MODIFY COLUMN protocol varchar(20) NULL COMMENT 'Api Test Protocol'; ALTER TABLE api_test_environment MODIFY COLUMN socket varchar(225) NULL COMMENT 'Api Test Socket'; ALTER TABLE api_test_environment MODIFY COLUMN `domain` varchar(225) NULL COMMENT 'Api Test Domain'; ALTER TABLE api_test_environment CHANGE custom_data `config` longtext COMMENT 'Config Data (JSON format)'; + +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V23__test_case_review.sql b/system-setting/backend/src/main/resources/db/migration/V23__test_case_review.sql index 0ae9798122..4654ce3e29 100644 --- a/system-setting/backend/src/main/resources/db/migration/V23__test_case_review.sql +++ b/system-setting/backend/src/main/resources/db/migration/V23__test_case_review.sql @@ -1,3 +1,4 @@ +SET SESSION innodb_lock_wait_timeout = 7200; create table if not exists test_case_comment ( id varchar(64) not null @@ -52,3 +53,5 @@ create table if not exists test_case_review_users ) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE utf8mb4_general_ci; + +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V24__modify_test_plan.sql b/system-setting/backend/src/main/resources/db/migration/V24__modify_test_plan.sql index dfc8bb353f..eee7be870e 100644 --- a/system-setting/backend/src/main/resources/db/migration/V24__modify_test_plan.sql +++ b/system-setting/backend/src/main/resources/db/migration/V24__modify_test_plan.sql @@ -1,4 +1,7 @@ +SET SESSION innodb_lock_wait_timeout = 7200; ALTER TABLE test_plan ADD planned_start_time bigint(13) NULL COMMENT 'Planned start time timestamp'; ALTER TABLE test_plan ADD planned_end_time bigint(13) NULL COMMENT 'Planned end time timestamp'; ALTER TABLE test_plan ADD actual_start_time bigint(13) NULL COMMENT 'Actual start time timestamp'; ALTER TABLE test_plan ADD actual_end_time bigint(13) NULL COMMENT 'Actual end time timestamp'; + +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V25__add_base_system_properties.sql b/system-setting/backend/src/main/resources/db/migration/V25__add_base_system_properties.sql index 293e102c34..cbcbcc9864 100644 --- a/system-setting/backend/src/main/resources/db/migration/V25__add_base_system_properties.sql +++ b/system-setting/backend/src/main/resources/db/migration/V25__add_base_system_properties.sql @@ -1 +1,4 @@ +SET SESSION innodb_lock_wait_timeout = 7200; INSERT into system_parameter values('base.url', 'http://localhost:8081', 'text', 1); + +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V26__modify_notice.sql b/system-setting/backend/src/main/resources/db/migration/V26__modify_notice.sql index 643bf75d55..d42f6f99e9 100644 --- a/system-setting/backend/src/main/resources/db/migration/V26__modify_notice.sql +++ b/system-setting/backend/src/main/resources/db/migration/V26__modify_notice.sql @@ -1,3 +1,4 @@ +SET SESSION innodb_lock_wait_timeout = 7200; ALTER TABLE notice ADD COLUMN id VARCHAR(50); UPDATE notice @@ -7,4 +8,5 @@ ALTER TABLE notice ALTER TABLE notice DROP COLUMN EMAIL; ALTER TABLE notice - ADD COLUMN type VARCHAR(100) DEFAULT 'EMAIL'; \ No newline at end of file + ADD COLUMN type VARCHAR(100) DEFAULT 'EMAIL'; +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V27__refactor_notice.sql b/system-setting/backend/src/main/resources/db/migration/V27__refactor_notice.sql index b51d2a4102..ad3e5f2f65 100644 --- a/system-setting/backend/src/main/resources/db/migration/V27__refactor_notice.sql +++ b/system-setting/backend/src/main/resources/db/migration/V27__refactor_notice.sql @@ -1,3 +1,4 @@ +SET SESSION innodb_lock_wait_timeout = 7200; ALTER TABLE notice ADD user_id VARCHAR(50) NULL; UPDATE notice @@ -7,4 +8,5 @@ SET notice.user_id = ( WHERE notice.NAME = user.name ); ALTER TABLE notice - DROP COLUMN name; \ No newline at end of file + DROP COLUMN name; +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V28__modify_test_case.sql b/system-setting/backend/src/main/resources/db/migration/V28__modify_test_case.sql index 44c725aed3..6a6811bde7 100644 --- a/system-setting/backend/src/main/resources/db/migration/V28__modify_test_case.sql +++ b/system-setting/backend/src/main/resources/db/migration/V28__modify_test_case.sql @@ -1,3 +1,5 @@ +SET SESSION innodb_lock_wait_timeout = 7200; alter table test_case add review_status varchar(25) null; -update test_case set review_status = 'Prepare' where review_status is null; \ No newline at end of file +update test_case set review_status = 'Prepare' where review_status is null; +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V29__test_case_matainer.sql b/system-setting/backend/src/main/resources/db/migration/V29__test_case_matainer.sql index fb713b2421..200316b425 100644 --- a/system-setting/backend/src/main/resources/db/migration/V29__test_case_matainer.sql +++ b/system-setting/backend/src/main/resources/db/migration/V29__test_case_matainer.sql @@ -1,2 +1,4 @@ +SET SESSION innodb_lock_wait_timeout = 7200; ALTER TABLE test_case - MODIFY maintainer varchar(50) NOT NULL COMMENT 'Test case maintainer'; \ No newline at end of file + MODIFY maintainer varchar(50) NOT NULL COMMENT 'Test case maintainer'; +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V2__metersphere_ddl.sql b/system-setting/backend/src/main/resources/db/migration/V2__metersphere_ddl.sql index 69b462486f..fc2ce932df 100644 --- a/system-setting/backend/src/main/resources/db/migration/V2__metersphere_ddl.sql +++ b/system-setting/backend/src/main/resources/db/migration/V2__metersphere_ddl.sql @@ -1,3 +1,4 @@ +SET SESSION innodb_lock_wait_timeout = 7200; CREATE TABLE IF NOT EXISTS `file_content` ( `file_id` varchar(64) NOT NULL COMMENT 'File ID', `file` longblob COMMENT 'File content', @@ -300,3 +301,5 @@ CREATE TABLE IF NOT EXISTS `test_case_report` ( + +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V30__test_case_file.sql b/system-setting/backend/src/main/resources/db/migration/V30__test_case_file.sql index f4b2c4a3d4..919e624814 100644 --- a/system-setting/backend/src/main/resources/db/migration/V30__test_case_file.sql +++ b/system-setting/backend/src/main/resources/db/migration/V30__test_case_file.sql @@ -1,3 +1,4 @@ +SET SESSION innodb_lock_wait_timeout = 7200; create table if not exists test_case_file ( case_id varchar(64) null, @@ -5,3 +6,5 @@ create table if not exists test_case_file constraint test_case_file_unique_key unique (case_id, file_id) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V31__message_task.sql b/system-setting/backend/src/main/resources/db/migration/V31__message_task.sql index c4d2b5cccc..44f4a7c67c 100644 --- a/system-setting/backend/src/main/resources/db/migration/V31__message_task.sql +++ b/system-setting/backend/src/main/resources/db/migration/V31__message_task.sql @@ -1,3 +1,4 @@ +SET SESSION innodb_lock_wait_timeout = 7200; CREATE TABLE IF NOT EXISTS message_task ( id varchar(50) NOT NULL, @@ -11,4 +12,5 @@ CREATE TABLE IF NOT EXISTS message_task ) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 - COLLATE utf8mb4_general_ci; \ No newline at end of file + COLLATE utf8mb4_general_ci; +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V32__test_case_prerequisite.sql b/system-setting/backend/src/main/resources/db/migration/V32__test_case_prerequisite.sql index 8eced76731..951b8d29ce 100644 --- a/system-setting/backend/src/main/resources/db/migration/V32__test_case_prerequisite.sql +++ b/system-setting/backend/src/main/resources/db/migration/V32__test_case_prerequisite.sql @@ -1 +1,3 @@ -alter table test_case modify prerequisite varchar(500) null comment 'Test case prerequisite condition'; \ No newline at end of file +SET SESSION innodb_lock_wait_timeout = 7200; +alter table test_case modify prerequisite varchar(500) null comment 'Test case prerequisite condition'; +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V33__modify_message_task.sql b/system-setting/backend/src/main/resources/db/migration/V33__modify_message_task.sql index 4d74aa41f9..33a717a530 100644 --- a/system-setting/backend/src/main/resources/db/migration/V33__modify_message_task.sql +++ b/system-setting/backend/src/main/resources/db/migration/V33__modify_message_task.sql @@ -1,4 +1,6 @@ +SET SESSION innodb_lock_wait_timeout = 7200; ALTER TABLE message_task ADD identification varchar(255) NOT NULL; ALTER TABLE message_task - ADD is_set tinyint(1) NOT NULL; \ No newline at end of file + ADD is_set tinyint(1) NOT NULL; +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V34__api_test_jar.sql b/system-setting/backend/src/main/resources/db/migration/V34__api_test_jar.sql index 0b84c49610..6cce1d583d 100644 --- a/system-setting/backend/src/main/resources/db/migration/V34__api_test_jar.sql +++ b/system-setting/backend/src/main/resources/db/migration/V34__api_test_jar.sql @@ -1,3 +1,4 @@ +SET SESSION innodb_lock_wait_timeout = 7200; CREATE TABLE IF NOT EXISTS `jar_config` ( `id` varchar(50) NOT NULL COMMENT 'ID', `name` varchar(64) NOT NULL COMMENT 'Name', @@ -11,3 +12,5 @@ CREATE TABLE IF NOT EXISTS `jar_config` ( `update_time` bigint(13) NOT NULL COMMENT 'Update timestamp', PRIMARY KEY (`id`) ) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE utf8mb4_general_ci; + +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V35__modify_test_plan.sql b/system-setting/backend/src/main/resources/db/migration/V35__modify_test_plan.sql index e743137b42..f3821844dd 100644 --- a/system-setting/backend/src/main/resources/db/migration/V35__modify_test_plan.sql +++ b/system-setting/backend/src/main/resources/db/migration/V35__modify_test_plan.sql @@ -1,2 +1,4 @@ +SET SESSION innodb_lock_wait_timeout = 7200; alter table test_plan - add creator varchar(255) not null; \ No newline at end of file + add creator varchar(255) not null; +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V36__add_messag_task.sql b/system-setting/backend/src/main/resources/db/migration/V36__add_messag_task.sql index 6929e395d7..10b0d4a174 100644 --- a/system-setting/backend/src/main/resources/db/migration/V36__add_messag_task.sql +++ b/system-setting/backend/src/main/resources/db/migration/V36__add_messag_task.sql @@ -1,2 +1,4 @@ +SET SESSION innodb_lock_wait_timeout = 7200; alter table message_task - add organization_id varchar(255) null; \ No newline at end of file + add organization_id varchar(255) null; +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V37__add_plan_index.sql b/system-setting/backend/src/main/resources/db/migration/V37__add_plan_index.sql index 762780f3e6..1492f0ba0a 100644 --- a/system-setting/backend/src/main/resources/db/migration/V37__add_plan_index.sql +++ b/system-setting/backend/src/main/resources/db/migration/V37__add_plan_index.sql @@ -1,2 +1,4 @@ +SET SESSION innodb_lock_wait_timeout = 7200; ALTER TABLE `test_plan_test_case` ADD INDEX index_name ( `case_id` ); -ALTER TABLE `test_case_review_test_case` ADD INDEX index_name ( `case_id` ); \ No newline at end of file +ALTER TABLE `test_case_review_test_case` ADD INDEX index_name ( `case_id` ); +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V38__modify_message_task_test_id.sql b/system-setting/backend/src/main/resources/db/migration/V38__modify_message_task_test_id.sql index 0ad779a39c..d3144e19c5 100644 --- a/system-setting/backend/src/main/resources/db/migration/V38__modify_message_task_test_id.sql +++ b/system-setting/backend/src/main/resources/db/migration/V38__modify_message_task_test_id.sql @@ -1,2 +1,4 @@ +SET SESSION innodb_lock_wait_timeout = 7200; ALTER TABLE message_task - ADD test_id varchar(50) NULL; \ No newline at end of file + ADD test_id varchar(50) NULL; +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V39__modify_message_task_create_time.sql b/system-setting/backend/src/main/resources/db/migration/V39__modify_message_task_create_time.sql index 74ecfc6196..f8cd875ebd 100644 --- a/system-setting/backend/src/main/resources/db/migration/V39__modify_message_task_create_time.sql +++ b/system-setting/backend/src/main/resources/db/migration/V39__modify_message_task_create_time.sql @@ -1,2 +1,4 @@ +SET SESSION innodb_lock_wait_timeout = 7200; ALTER TABLE message_task - ADD create_time bigint(13) DEFAULT 0; \ No newline at end of file + ADD create_time bigint(13) DEFAULT 0; +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V3__init_data.sql b/system-setting/backend/src/main/resources/db/migration/V3__init_data.sql index 16922d9d0c..f1dd86a435 100644 --- a/system-setting/backend/src/main/resources/db/migration/V3__init_data.sql +++ b/system-setting/backend/src/main/resources/db/migration/V3__init_data.sql @@ -1,3 +1,4 @@ +SET SESSION innodb_lock_wait_timeout = 7200; INSERT INTO user (id, name, email, password, status, create_time, update_time, language, last_workspace_id, last_organization_id, phone) VALUES ('admin', 'Administrator', 'admin@metersphere.io', md5('metersphere'), '1', unix_timestamp() * 1000, unix_timestamp() * 1000, NULL, '', NULL, NULL); @@ -43,3 +44,5 @@ INSERT INTO test_case_report_template (id, name, content) VALUES (uuid(), 'default', '{\"components\": [1,2,3,4,5]}'); INSERT INTO system_parameter (param_key, param_value, type, sort) VALUES ('default.language', 'zh_CN', 'text', 5); + +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V40__test_case_node_add_pos.sql b/system-setting/backend/src/main/resources/db/migration/V40__test_case_node_add_pos.sql index 36978c314a..2a1f2d4b48 100644 --- a/system-setting/backend/src/main/resources/db/migration/V40__test_case_node_add_pos.sql +++ b/system-setting/backend/src/main/resources/db/migration/V40__test_case_node_add_pos.sql @@ -1,3 +1,4 @@ +SET SESSION innodb_lock_wait_timeout = 7200; alter table test_case_node add pos double null; DROP PROCEDURE IF EXISTS pos_cursor; @@ -55,4 +56,5 @@ END // DELIMITER ; CALL pos_cursor(); -DROP PROCEDURE IF EXISTS pos_cursor; \ No newline at end of file +DROP PROCEDURE IF EXISTS pos_cursor; +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V41__set_ui.sql b/system-setting/backend/src/main/resources/db/migration/V41__set_ui.sql index e4cbf85c02..d71a4ffee0 100644 --- a/system-setting/backend/src/main/resources/db/migration/V41__set_ui.sql +++ b/system-setting/backend/src/main/resources/db/migration/V41__set_ui.sql @@ -1,3 +1,4 @@ +SET SESSION innodb_lock_wait_timeout = 7200; INSERT INTO system_parameter (param_key, param_value, type, sort) VALUES ('ui.loginImage', NULL, 'file', 3); INSERT INTO system_parameter (param_key, param_value, type, sort) @@ -7,4 +8,5 @@ VALUES ('ui.loginTitle', '', 'text', 4); INSERT INTO system_parameter (param_key, param_value, type, sort) VALUES ('ui.logo', NULL, 'file', 1); INSERT INTO system_parameter (param_key, param_value, type, sort) -VALUES ('ui.title', '', 'text', 5); \ No newline at end of file +VALUES ('ui.title', '', 'text', 5); +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V42__modify_load_test_report.sql b/system-setting/backend/src/main/resources/db/migration/V42__modify_load_test_report.sql index 77ad67bd9a..c39499f4c0 100644 --- a/system-setting/backend/src/main/resources/db/migration/V42__modify_load_test_report.sql +++ b/system-setting/backend/src/main/resources/db/migration/V42__modify_load_test_report.sql @@ -1,2 +1,4 @@ +SET SESSION innodb_lock_wait_timeout = 7200; ALTER TABLE load_test_report - ADD file_id VARCHAR(50) NULL; \ No newline at end of file + ADD file_id VARCHAR(50) NULL; +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V43__add_role.sql b/system-setting/backend/src/main/resources/db/migration/V43__add_role.sql index 7b6ba33c6f..5189425c91 100644 --- a/system-setting/backend/src/main/resources/db/migration/V43__add_role.sql +++ b/system-setting/backend/src/main/resources/db/migration/V43__add_role.sql @@ -1,2 +1,4 @@ +SET SESSION innodb_lock_wait_timeout = 7200; INSERT INTO role (id, name, description, type, create_time, update_time) -VALUES ('org_member', '组织成员', NULL, NULL, unix_timestamp() * 1000, unix_timestamp() * 1000); \ No newline at end of file +VALUES ('org_member', '组织成员', NULL, NULL, unix_timestamp() * 1000, unix_timestamp() * 1000); +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V44__project_add_zentao_id.sql b/system-setting/backend/src/main/resources/db/migration/V44__project_add_zentao_id.sql index 11e373adc8..fa4ad9e4d2 100644 --- a/system-setting/backend/src/main/resources/db/migration/V44__project_add_zentao_id.sql +++ b/system-setting/backend/src/main/resources/db/migration/V44__project_add_zentao_id.sql @@ -1 +1,3 @@ -alter table project add zentao_id varchar(50) null; \ No newline at end of file +SET SESSION innodb_lock_wait_timeout = 7200; +alter table project add zentao_id varchar(50) null; +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V45__modify_issues.sql b/system-setting/backend/src/main/resources/db/migration/V45__modify_issues.sql index 0617627ced..b9fdbbdab0 100644 --- a/system-setting/backend/src/main/resources/db/migration/V45__modify_issues.sql +++ b/system-setting/backend/src/main/resources/db/migration/V45__modify_issues.sql @@ -1,4 +1,6 @@ +SET SESSION innodb_lock_wait_timeout = 7200; alter table issues drop primary key; alter table issues add constraint issues_pk - primary key (id, platform); \ No newline at end of file + primary key (id, platform); +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V47__api_data_view.sql b/system-setting/backend/src/main/resources/db/migration/V47__api_data_view.sql index 6976cbb28a..e1e0349a61 100644 --- a/system-setting/backend/src/main/resources/db/migration/V47__api_data_view.sql +++ b/system-setting/backend/src/main/resources/db/migration/V47__api_data_view.sql @@ -1,3 +1,4 @@ +SET SESSION innodb_lock_wait_timeout = 7200; CREATE TABLE IF NOT EXISTS `api_data_view` ( id varchar(50) NOT NULL primary key, @@ -10,3 +11,5 @@ CREATE TABLE IF NOT EXISTS `api_data_view` create_time timestamp default CURRENT_TIMESTAMP NOT NULL, update_time timestamp default CURRENT_TIMESTAMP NOT NULL ) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE utf8mb4_general_ci; + +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V48__notice_template.sql b/system-setting/backend/src/main/resources/db/migration/V48__notice_template.sql index 9e0ee80fc5..7a55edafa3 100644 --- a/system-setting/backend/src/main/resources/db/migration/V48__notice_template.sql +++ b/system-setting/backend/src/main/resources/db/migration/V48__notice_template.sql @@ -1,3 +1,4 @@ +SET SESSION innodb_lock_wait_timeout = 7200; ALTER TABLE message_task MODIFY identification varchar(50) NOT NULL; @@ -10,4 +11,5 @@ ALTER TABLE message_task ALTER TABLE message_task ADD template TEXT NULL; -DROP TABLE IF EXISTS notice; \ No newline at end of file +DROP TABLE IF EXISTS notice; +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V49__user_add_project_id.sql b/system-setting/backend/src/main/resources/db/migration/V49__user_add_project_id.sql index c282253624..a868707f85 100644 --- a/system-setting/backend/src/main/resources/db/migration/V49__user_add_project_id.sql +++ b/system-setting/backend/src/main/resources/db/migration/V49__user_add_project_id.sql @@ -1 +1,3 @@ -alter table user add last_project_id varchar(50) null; \ No newline at end of file +SET SESSION innodb_lock_wait_timeout = 7200; +alter table user add last_project_id varchar(50) null; +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V4__user_key.sql b/system-setting/backend/src/main/resources/db/migration/V4__user_key.sql index 3bdb7015f4..f2767f043e 100644 --- a/system-setting/backend/src/main/resources/db/migration/V4__user_key.sql +++ b/system-setting/backend/src/main/resources/db/migration/V4__user_key.sql @@ -1,3 +1,4 @@ +SET SESSION innodb_lock_wait_timeout = 7200; CREATE TABLE `user_key` ( `id` varchar(50) NOT NULL DEFAULT '' COMMENT 'user_key ID', `user_id` varchar(50) NOT NULL COMMENT '用户ID', @@ -10,3 +11,5 @@ CREATE TABLE `user_key` ( KEY `IDX_USER_ID` (`user_id`) ) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE utf8mb4_general_ci; + +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V50__api_scenario.sql b/system-setting/backend/src/main/resources/db/migration/V50__api_scenario.sql index 6b99f109c0..5e755c3387 100644 --- a/system-setting/backend/src/main/resources/db/migration/V50__api_scenario.sql +++ b/system-setting/backend/src/main/resources/db/migration/V50__api_scenario.sql @@ -1,3 +1,4 @@ +SET SESSION innodb_lock_wait_timeout = 7200; ALTER TABLE test_plan ADD api_ids varchar(1000) NULL COMMENT 'Api id list'; ALTER TABLE test_plan ADD scenario_ids varchar(1000) NULL COMMENT 'Scenario id list'; @@ -59,3 +60,5 @@ CREATE TABLE `api_scenario_report_detail` ( `content` longblob COMMENT 'Report Content', PRIMARY KEY (`report_id`) ) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE utf8mb4_general_ci; + +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V51__api_definition.sql b/system-setting/backend/src/main/resources/db/migration/V51__api_definition.sql index ad4465de88..4454db61b9 100644 --- a/system-setting/backend/src/main/resources/db/migration/V51__api_definition.sql +++ b/system-setting/backend/src/main/resources/db/migration/V51__api_definition.sql @@ -1,3 +1,4 @@ +SET SESSION innodb_lock_wait_timeout = 7200; CREATE TABLE IF NOT EXISTS `api_module` ( `id` varchar(50) NOT NULL COMMENT 'Test case node ID', `project_id` varchar(50) NOT NULL COMMENT 'Project ID this node belongs to', @@ -67,3 +68,5 @@ ALTER TABLE `api_test_case` ADD INDEX ( `api_definition_id` ); ALTER TABLE `api_test_case` ADD INDEX ( `create_user_id` ); ALTER TABLE `api_test_case` ADD INDEX ( `update_user_id` ); ALTER TABLE `api_definition_exec_result` ADD INDEX ( `resource_id` ); + +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V52__test_plan_api.sql b/system-setting/backend/src/main/resources/db/migration/V52__test_plan_api.sql index 86e5fb66df..424fc147a2 100644 --- a/system-setting/backend/src/main/resources/db/migration/V52__test_plan_api.sql +++ b/system-setting/backend/src/main/resources/db/migration/V52__test_plan_api.sql @@ -1,3 +1,4 @@ +SET SESSION innodb_lock_wait_timeout = 7200; CREATE TABLE IF NOT EXISTS `test_plan_api_case` ( `id` varchar(50) NOT NULL COMMENT 'ID', `test_plan_id` varchar(50) NOT NULL COMMENT 'Test plan ID', @@ -27,3 +28,5 @@ CREATE TABLE IF NOT EXISTS `test_plan_api_scenario` ( ) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE utf8mb4_general_ci; ALTER TABLE api_definition_exec_result ADD `type` varchar(20) NULL; + +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V53__modify_api_scenario.sql b/system-setting/backend/src/main/resources/db/migration/V53__modify_api_scenario.sql index ee6a7c1c3c..00f6ddbd0c 100644 --- a/system-setting/backend/src/main/resources/db/migration/V53__modify_api_scenario.sql +++ b/system-setting/backend/src/main/resources/db/migration/V53__modify_api_scenario.sql @@ -1 +1,3 @@ -ALTER TABLE api_scenario CHANGE tag_id tags varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT 'tag list'; \ No newline at end of file +SET SESSION innodb_lock_wait_timeout = 7200; +ALTER TABLE api_scenario CHANGE tag_id tags varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT 'tag list'; +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V54__test_resource_pool_image.sql b/system-setting/backend/src/main/resources/db/migration/V54__test_resource_pool_image.sql index f81852c814..a352d21ba0 100644 --- a/system-setting/backend/src/main/resources/db/migration/V54__test_resource_pool_image.sql +++ b/system-setting/backend/src/main/resources/db/migration/V54__test_resource_pool_image.sql @@ -1,2 +1,4 @@ +SET SESSION innodb_lock_wait_timeout = 7200; ALTER TABLE test_resource_pool - ADD image VARCHAR(100) NULL; \ No newline at end of file + ADD image VARCHAR(100) NULL; +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V55__modify_api_scenario_report.sql b/system-setting/backend/src/main/resources/db/migration/V55__modify_api_scenario_report.sql index 9d38656f6f..b8ffd0b1f8 100644 --- a/system-setting/backend/src/main/resources/db/migration/V55__modify_api_scenario_report.sql +++ b/system-setting/backend/src/main/resources/db/migration/V55__modify_api_scenario_report.sql @@ -1,4 +1,7 @@ +SET SESSION innodb_lock_wait_timeout = 7200; ALTER TABLE api_scenario_report ADD scenario_name varchar(255) NULL; ALTER TABLE api_scenario_report ADD scenario_id varchar(100) NULL; ALTER TABLE test_plan DROP COLUMN api_ids; ALTER TABLE test_plan DROP COLUMN scenario_ids; + +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V56__modify_api_module_pos.sql b/system-setting/backend/src/main/resources/db/migration/V56__modify_api_module_pos.sql index b41877b22c..35d995526d 100644 --- a/system-setting/backend/src/main/resources/db/migration/V56__modify_api_module_pos.sql +++ b/system-setting/backend/src/main/resources/db/migration/V56__modify_api_module_pos.sql @@ -1,3 +1,5 @@ +SET SESSION innodb_lock_wait_timeout = 7200; set @rownum=0; update api_module set pos=(select @rownum := @rownum +1) where pos is null; -update api_scenario_module set pos=(select @rownum := @rownum +1) where pos is null; \ No newline at end of file +update api_scenario_module set pos=(select @rownum := @rownum +1) where pos is null; +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V57__init_api_definition_num.sql b/system-setting/backend/src/main/resources/db/migration/V57__init_api_definition_num.sql index 8c3055ec2e..893b4c21ae 100644 --- a/system-setting/backend/src/main/resources/db/migration/V57__init_api_definition_num.sql +++ b/system-setting/backend/src/main/resources/db/migration/V57__init_api_definition_num.sql @@ -1,3 +1,4 @@ +SET SESSION innodb_lock_wait_timeout = 7200; alter table api_definition add num int null comment 'api definition ID'; alter table api_test_case add num int null comment 'api test case ID'; alter table api_scenario add num int null comment 'api scenario ID'; @@ -122,4 +123,5 @@ END // DELIMITER ; CALL test_cursor1(); -DROP PROCEDURE IF EXISTS test_cursor1; \ No newline at end of file +DROP PROCEDURE IF EXISTS test_cursor1; +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V58__add_index.sql b/system-setting/backend/src/main/resources/db/migration/V58__add_index.sql index c061fd9526..c859bb8fb0 100644 --- a/system-setting/backend/src/main/resources/db/migration/V58__add_index.sql +++ b/system-setting/backend/src/main/resources/db/migration/V58__add_index.sql @@ -1,3 +1,5 @@ +SET SESSION innodb_lock_wait_timeout = 7200; create index project_workspace_id_index on project (workspace_id); create index test_case_review_creator_index on test_case_review (creator); -create index test_case_review_project_project_id_index on test_case_review_project (project_id); \ No newline at end of file +create index test_case_review_project_project_id_index on test_case_review_project (project_id); +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V59__test_plan_add_project_id.sql b/system-setting/backend/src/main/resources/db/migration/V59__test_plan_add_project_id.sql index 6adf1e522b..226d1c0fab 100644 --- a/system-setting/backend/src/main/resources/db/migration/V59__test_plan_add_project_id.sql +++ b/system-setting/backend/src/main/resources/db/migration/V59__test_plan_add_project_id.sql @@ -1,3 +1,4 @@ +SET SESSION innodb_lock_wait_timeout = 7200; alter table test_plan add project_id varchar(50) null comment '测试计划所属项目'; ALTER TABLE api_test_case MODIFY COLUMN name varchar(255) NOT NULL COMMENT 'Test case name'; @@ -53,4 +54,5 @@ END // DELIMITER ; CALL test_cursor(); -DROP PROCEDURE IF EXISTS test_cursor; \ No newline at end of file +DROP PROCEDURE IF EXISTS test_cursor; +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V5__schedule.sql b/system-setting/backend/src/main/resources/db/migration/V5__schedule.sql index cfebdfaf72..ad5567a939 100644 --- a/system-setting/backend/src/main/resources/db/migration/V5__schedule.sql +++ b/system-setting/backend/src/main/resources/db/migration/V5__schedule.sql @@ -1,3 +1,4 @@ +SET SESSION innodb_lock_wait_timeout = 7200; -- quartz start CREATE TABLE `QRTZ_JOB_DETAILS` ( `SCHED_NAME` varchar(120) NOT NULL, @@ -173,3 +174,5 @@ UPDATE `api_test_report` SET `trigger_mode` = 'MANUAL' WHERE 1; UPDATE `load_test_report` SET `trigger_mode` = 'MANUAL' WHERE 1; alter table test_case add sort int null comment 'Import test case sort'; + +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V60__modify_project_add_repeatable.sql b/system-setting/backend/src/main/resources/db/migration/V60__modify_project_add_repeatable.sql index 14f0f08f08..9993021f55 100644 --- a/system-setting/backend/src/main/resources/db/migration/V60__modify_project_add_repeatable.sql +++ b/system-setting/backend/src/main/resources/db/migration/V60__modify_project_add_repeatable.sql @@ -1 +1,3 @@ -ALTER TABLE project ADD repeatable tinyint(1) DEFAULT null; \ No newline at end of file +SET SESSION innodb_lock_wait_timeout = 7200; +ALTER TABLE project ADD repeatable tinyint(1) DEFAULT null; +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V61__modify_test_case_name.sql b/system-setting/backend/src/main/resources/db/migration/V61__modify_test_case_name.sql index d1c976869b..7d7223d19f 100644 --- a/system-setting/backend/src/main/resources/db/migration/V61__modify_test_case_name.sql +++ b/system-setting/backend/src/main/resources/db/migration/V61__modify_test_case_name.sql @@ -1 +1,3 @@ -ALTER TABLE test_case MODIFY COLUMN name varchar(255) NOT NULL COMMENT 'Test case name'; \ No newline at end of file +SET SESSION innodb_lock_wait_timeout = 7200; +ALTER TABLE test_case MODIFY COLUMN name varchar(255) NOT NULL COMMENT 'Test case name'; +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V62__add_test_plan_load_case.sql b/system-setting/backend/src/main/resources/db/migration/V62__add_test_plan_load_case.sql index d0b4ce751f..7e29adb8b0 100644 --- a/system-setting/backend/src/main/resources/db/migration/V62__add_test_plan_load_case.sql +++ b/system-setting/backend/src/main/resources/db/migration/V62__add_test_plan_load_case.sql @@ -1,3 +1,4 @@ +SET SESSION innodb_lock_wait_timeout = 7200; CREATE TABLE IF NOT EXISTS `test_plan_load_case` ( `id` varchar(50) NOT NULL COMMENT 'ID', @@ -10,3 +11,5 @@ CREATE TABLE IF NOT EXISTS `test_plan_load_case` PRIMARY KEY (`id`), UNIQUE KEY `plan_load_case_id` (`test_plan_id`, `load_case_id`) ) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE utf8mb4_general_ci; + +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V63__add_tag.sql b/system-setting/backend/src/main/resources/db/migration/V63__add_tag.sql index 106cade332..a4cbe305ff 100644 --- a/system-setting/backend/src/main/resources/db/migration/V63__add_tag.sql +++ b/system-setting/backend/src/main/resources/db/migration/V63__add_tag.sql @@ -1,3 +1,4 @@ +SET SESSION innodb_lock_wait_timeout = 7200; ALTER TABLE api_definition ADD tags VARCHAR(1000) NULL; @@ -5,4 +6,5 @@ ALTER TABLE api_test_case ADD tags VARCHAR(1000) NULL; ALTER TABLE test_case - ADD tags VARCHAR(1000) NULL; \ No newline at end of file + ADD tags VARCHAR(1000) NULL; +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V64__auth_source.sql b/system-setting/backend/src/main/resources/db/migration/V64__auth_source.sql index d1ea87daa1..c10075337b 100644 --- a/system-setting/backend/src/main/resources/db/migration/V64__auth_source.sql +++ b/system-setting/backend/src/main/resources/db/migration/V64__auth_source.sql @@ -1,3 +1,4 @@ +SET SESSION innodb_lock_wait_timeout = 7200; CREATE TABLE IF NOT EXISTS `auth_source` ( `id` varchar(50) NOT NULL, `configuration` text NOT NULL, @@ -10,3 +11,5 @@ CREATE TABLE IF NOT EXISTS `auth_source` ( PRIMARY KEY (`id`) ) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE utf8mb4_general_ci; + +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V65__init_load_test_num.sql b/system-setting/backend/src/main/resources/db/migration/V65__init_load_test_num.sql index ad6c223dc8..370074502e 100644 --- a/system-setting/backend/src/main/resources/db/migration/V65__init_load_test_num.sql +++ b/system-setting/backend/src/main/resources/db/migration/V65__init_load_test_num.sql @@ -1,3 +1,4 @@ +SET SESSION innodb_lock_wait_timeout = 7200; alter table load_test add num int null; DROP PROCEDURE IF EXISTS test_cursor; @@ -49,3 +50,5 @@ DELIMITER ; CALL test_cursor(); DROP PROCEDURE IF EXISTS test_cursor; + +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V66__init_test_plan_report.sql b/system-setting/backend/src/main/resources/db/migration/V66__init_test_plan_report.sql index d30a8776e8..0a5740d5c5 100644 --- a/system-setting/backend/src/main/resources/db/migration/V66__init_test_plan_report.sql +++ b/system-setting/backend/src/main/resources/db/migration/V66__init_test_plan_report.sql @@ -1,3 +1,4 @@ +SET SESSION innodb_lock_wait_timeout = 7200; CREATE TABLE IF NOT EXISTS `test_plan_report` ( `id` VARCHAR ( 50 ) NOT NULL COMMENT 'ID', `test_plan_id` VARCHAR ( 50 ) NOT NULL COMMENT 'Test plan ID', @@ -30,3 +31,5 @@ CREATE TABLE IF NOT EXISTS `test_plan_report_data` ( PRIMARY KEY ( `id` ), UNIQUE KEY `test_plan_report_id` ( `test_plan_report_id` ) ) ENGINE = INNODB DEFAULT CHARSET = utf8mb4 COLLATE utf8mb4_general_ci; + +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V67__case_review_add_project_id.sql b/system-setting/backend/src/main/resources/db/migration/V67__case_review_add_project_id.sql index 8450b3753b..3a954ae852 100644 --- a/system-setting/backend/src/main/resources/db/migration/V67__case_review_add_project_id.sql +++ b/system-setting/backend/src/main/resources/db/migration/V67__case_review_add_project_id.sql @@ -1,3 +1,4 @@ +SET SESSION innodb_lock_wait_timeout = 7200; alter table test_case_review add project_id varchar(50) null comment '用例评审所属项目'; DROP PROCEDURE IF EXISTS test_cursor; @@ -52,4 +53,5 @@ END // DELIMITER ; CALL test_cursor(); -DROP PROCEDURE IF EXISTS test_cursor; \ No newline at end of file +DROP PROCEDURE IF EXISTS test_cursor; +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V68__modify_api_test_case.sql b/system-setting/backend/src/main/resources/db/migration/V68__modify_api_test_case.sql index 92d68de76e..9532b32884 100644 --- a/system-setting/backend/src/main/resources/db/migration/V68__modify_api_test_case.sql +++ b/system-setting/backend/src/main/resources/db/migration/V68__modify_api_test_case.sql @@ -1,3 +1,4 @@ +SET SESSION innodb_lock_wait_timeout = 7200; ALTER TABLE api_test_case drop COLUMN response; ALTER TABLE api_test_case add COLUMN last_result_id varchar(64) COMMENT 'Last ApiDefinitionExecResult ID'; @@ -26,3 +27,5 @@ INNER JOIN ( WHERE tt.id = tc.id; + +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V69__swagger_url_project.sql b/system-setting/backend/src/main/resources/db/migration/V69__swagger_url_project.sql index 5510a03b3d..93394e1f65 100644 --- a/system-setting/backend/src/main/resources/db/migration/V69__swagger_url_project.sql +++ b/system-setting/backend/src/main/resources/db/migration/V69__swagger_url_project.sql @@ -1,3 +1,4 @@ +SET SESSION innodb_lock_wait_timeout = 7200; create table swagger_url_project ( id varchar(30) not null, @@ -9,3 +10,5 @@ create table swagger_url_project primary key (id) ) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE utf8mb4_general_ci; + +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V6__api_test_environment.sql b/system-setting/backend/src/main/resources/db/migration/V6__api_test_environment.sql index 1e0bba1813..a47373b41c 100644 --- a/system-setting/backend/src/main/resources/db/migration/V6__api_test_environment.sql +++ b/system-setting/backend/src/main/resources/db/migration/V6__api_test_environment.sql @@ -1,3 +1,4 @@ +SET SESSION innodb_lock_wait_timeout = 7200; CREATE TABLE IF NOT EXISTS `api_test_environment` ( `id` varchar(50) NOT NULL COMMENT 'Api Test Environment ID', `name` varchar(64) NOT NULL COMMENT 'Api Test Environment Name', @@ -12,3 +13,5 @@ CREATE TABLE IF NOT EXISTS `api_test_environment` ( PRIMARY KEY (`id`), KEY `project_id` ( `project_id` ) ) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE utf8mb4_general_ci; + +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V70__modify_test_plan_report.sql b/system-setting/backend/src/main/resources/db/migration/V70__modify_test_plan_report.sql index e0e32b8010..7e073c6dc0 100644 --- a/system-setting/backend/src/main/resources/db/migration/V70__modify_test_plan_report.sql +++ b/system-setting/backend/src/main/resources/db/migration/V70__modify_test_plan_report.sql @@ -1 +1,3 @@ -ALTER TABLE test_plan_report ADD components VARCHAR (20); \ No newline at end of file +SET SESSION innodb_lock_wait_timeout = 7200; +ALTER TABLE test_plan_report ADD components VARCHAR (20); +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V71__modify_scenario.sql b/system-setting/backend/src/main/resources/db/migration/V71__modify_scenario.sql index 6edc321985..3acbb2357f 100644 --- a/system-setting/backend/src/main/resources/db/migration/V71__modify_scenario.sql +++ b/system-setting/backend/src/main/resources/db/migration/V71__modify_scenario.sql @@ -1 +1,3 @@ -ALTER TABLE api_scenario MODIFY COLUMN id VARCHAR (120); \ No newline at end of file +SET SESSION innodb_lock_wait_timeout = 7200; +ALTER TABLE api_scenario MODIFY COLUMN id VARCHAR (120); +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V72__modify_swagger_url_project.sql b/system-setting/backend/src/main/resources/db/migration/V72__modify_swagger_url_project.sql index bba509bd4a..73f122a945 100644 --- a/system-setting/backend/src/main/resources/db/migration/V72__modify_swagger_url_project.sql +++ b/system-setting/backend/src/main/resources/db/migration/V72__modify_swagger_url_project.sql @@ -1,6 +1,9 @@ +SET SESSION innodb_lock_wait_timeout = 7200; ALTER TABLE swagger_url_project MODIFY COLUMN id VARCHAR(120); ALTER TABLE swagger_url_project MODIFY COLUMN project_id VARCHAR(120); ALTER TABLE swagger_url_project MODIFY COLUMN mode_id VARCHAR(120); + +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V73__modify_test_plan_api_scenario_id.sql b/system-setting/backend/src/main/resources/db/migration/V73__modify_test_plan_api_scenario_id.sql index c4926b6d4d..e75ce4cece 100644 --- a/system-setting/backend/src/main/resources/db/migration/V73__modify_test_plan_api_scenario_id.sql +++ b/system-setting/backend/src/main/resources/db/migration/V73__modify_test_plan_api_scenario_id.sql @@ -1,3 +1,6 @@ +SET SESSION innodb_lock_wait_timeout = 7200; ALTER TABLE api_scenario MODIFY COLUMN id VARCHAR (255); ALTER TABLE test_plan_api_scenario MODIFY COLUMN api_scenario_id VARCHAR (255); ALTER TABLE api_scenario_report MODIFY COLUMN scenario_id VARCHAR (255); + +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V74__modify_schedule_message_task.sql b/system-setting/backend/src/main/resources/db/migration/V74__modify_schedule_message_task.sql index 695c6b2f11..31b622da2e 100644 --- a/system-setting/backend/src/main/resources/db/migration/V74__modify_schedule_message_task.sql +++ b/system-setting/backend/src/main/resources/db/migration/V74__modify_schedule_message_task.sql @@ -1,4 +1,7 @@ +SET SESSION innodb_lock_wait_timeout = 7200; ALTER TABLE schedule MODIFY COLUMN id VARCHAR (255); ALTER TABLE message_task MODIFY COLUMN id VARCHAR (255); + +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V75__modify_schedule_message_task_test_id.sql b/system-setting/backend/src/main/resources/db/migration/V75__modify_schedule_message_task_test_id.sql index b1092b7e3f..3cbd273258 100644 --- a/system-setting/backend/src/main/resources/db/migration/V75__modify_schedule_message_task_test_id.sql +++ b/system-setting/backend/src/main/resources/db/migration/V75__modify_schedule_message_task_test_id.sql @@ -1,4 +1,7 @@ +SET SESSION innodb_lock_wait_timeout = 7200; ALTER TABLE schedule MODIFY COLUMN resource_id VARCHAR (255); ALTER TABLE message_task MODIFY COLUMN test_id VARCHAR (255); + +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V77__modify_schedule_test_id.sql b/system-setting/backend/src/main/resources/db/migration/V77__modify_schedule_test_id.sql index 15a8e1591e..6efdf64340 100644 --- a/system-setting/backend/src/main/resources/db/migration/V77__modify_schedule_test_id.sql +++ b/system-setting/backend/src/main/resources/db/migration/V77__modify_schedule_test_id.sql @@ -1,2 +1,5 @@ +SET SESSION innodb_lock_wait_timeout = 7200; ALTER TABLE schedule MODIFY COLUMN `key` VARCHAR(255); + +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V78__v1.8_release.sql b/system-setting/backend/src/main/resources/db/migration/V78__v1.8_release.sql index df2a0b4739..4dd9587785 100644 --- a/system-setting/backend/src/main/resources/db/migration/V78__v1.8_release.sql +++ b/system-setting/backend/src/main/resources/db/migration/V78__v1.8_release.sql @@ -1,3 +1,4 @@ +SET SESSION innodb_lock_wait_timeout = 7200; -- create tale user_header CREATE TABLE IF NOT EXISTS `user_header` ( @@ -244,3 +245,5 @@ values ('test_plan_scenario_case', '[{"id":"num","label":"ID"},{"id":"name","label":"名称"},{"id":"level","label":"用例等级"},{"id":"tagNames","label":"标签"},{"id":"userId","label":"创建人"},{"id":"updateTime","label":"最后更新时间"},{"id":"stepTotal","label":"通过"},{"id":"lastResult","label":"失败"},{"id":"passRate","label":"通过率"}]'); alter table system_header add primary key(type); + +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V79__v1.8.1_release.sql b/system-setting/backend/src/main/resources/db/migration/V79__v1.8.1_release.sql index 4c177ecbc6..8782b15304 100644 --- a/system-setting/backend/src/main/resources/db/migration/V79__v1.8.1_release.sql +++ b/system-setting/backend/src/main/resources/db/migration/V79__v1.8.1_release.sql @@ -1,5 +1,7 @@ +SET SESSION innodb_lock_wait_timeout = 7200; -- file name length change ALTER TABLE file_metadata MODIFY name VARCHAR(250) NOT NULL COMMENT 'File name'; -- api_scenario_report modify column length -ALTER TABLE api_scenario_report MODIFY COLUMN name VARCHAR(300); \ No newline at end of file +ALTER TABLE api_scenario_report MODIFY COLUMN name VARCHAR(300); +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V7__modify_user_table.sql b/system-setting/backend/src/main/resources/db/migration/V7__modify_user_table.sql index 7478341931..9eedf97682 100644 --- a/system-setting/backend/src/main/resources/db/migration/V7__modify_user_table.sql +++ b/system-setting/backend/src/main/resources/db/migration/V7__modify_user_table.sql @@ -1,3 +1,5 @@ +SET SESSION innodb_lock_wait_timeout = 7200; alter table user add source varchar(50) null; -update user set source = 'LOCAL' where source is null; \ No newline at end of file +update user set source = 'LOCAL' where source is null; +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V80__v1.9.0_release.sql b/system-setting/backend/src/main/resources/db/migration/V80__v1.9.0_release.sql index 209e788622..65e0328335 100644 --- a/system-setting/backend/src/main/resources/db/migration/V80__v1.9.0_release.sql +++ b/system-setting/backend/src/main/resources/db/migration/V80__v1.9.0_release.sql @@ -1,3 +1,4 @@ +SET SESSION innodb_lock_wait_timeout = 7200; -- issues template and test case template -- 自定义字段表 @@ -249,3 +250,5 @@ alter table test_case add custom_num varchar(64) null comment 'custom num'; -- 修改前置条件为text ALTER TABLE test_case MODIFY COLUMN prerequisite text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT 'Test case prerequisite condition'; + +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V81__v1.9.1_release.sql b/system-setting/backend/src/main/resources/db/migration/V81__v1.9.1_release.sql index c1f4738b5d..8cc1376035 100644 --- a/system-setting/backend/src/main/resources/db/migration/V81__v1.9.1_release.sql +++ b/system-setting/backend/src/main/resources/db/migration/V81__v1.9.1_release.sql @@ -1 +1,4 @@ +SET SESSION innodb_lock_wait_timeout = 7200; ALTER TABLE api_scenario_report MODIFY COLUMN scenario_name VARCHAR(3000); + +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V82__v1.9.2_release.sql b/system-setting/backend/src/main/resources/db/migration/V82__v1.9.2_release.sql index 7aa5234cfe..d6da4f753d 100644 --- a/system-setting/backend/src/main/resources/db/migration/V82__v1.9.2_release.sql +++ b/system-setting/backend/src/main/resources/db/migration/V82__v1.9.2_release.sql @@ -1,3 +1,4 @@ +SET SESSION innodb_lock_wait_timeout = 7200; -- 缺陷添加创建人字段 ALTER TABLE issues ADD creator varchar(50) NULL COMMENT 'Creator'; @@ -21,3 +22,5 @@ where type = 'api_scenario_list'; update system_header set props= '[{"id":"num","label":"ID"},{"id":"status","label":"接口状态"},{"id":"name","label":"接口名称"},{"id":"method","label":"请求类型"},{"id":"userName","label":"负责人"},{"id":"path","label":"路径"},{"id":"tags","label":"标签"},{"id":"updateTime","label":"最后更新时间"},{"id":"caseTotal","label":"用例数"},{"id":"caseStatus","label":"用例状态"},{"id":"casePassingRate","label":"用例通过率"}]' where type = 'api_list'; + +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V83__v1.9.3_release.sql b/system-setting/backend/src/main/resources/db/migration/V83__v1.9.3_release.sql index 6b3fc86185..9d6b237774 100644 --- a/system-setting/backend/src/main/resources/db/migration/V83__v1.9.3_release.sql +++ b/system-setting/backend/src/main/resources/db/migration/V83__v1.9.3_release.sql @@ -1,3 +1,4 @@ +SET SESSION innodb_lock_wait_timeout = 7200; -- load_test_report ALTER TABLE load_test_report ADD project_id VARCHAR(50) NULL; @@ -28,3 +29,5 @@ SET load_test_report.test_resource_pool_id = load_test.test_resource_pool_id; -- + +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V84__v1.10_release.sql b/system-setting/backend/src/main/resources/db/migration/V84__v1.10_release.sql index a5610d5e52..bda0dc83a1 100644 --- a/system-setting/backend/src/main/resources/db/migration/V84__v1.10_release.sql +++ b/system-setting/backend/src/main/resources/db/migration/V84__v1.10_release.sql @@ -1,3 +1,4 @@ +SET SESSION innodb_lock_wait_timeout = 7200; -- schedule alter table schedule add config VARCHAR(500) null; @@ -144,3 +145,5 @@ where type = 'test_plan_list'; update system_header set props='[{"id":"name","label":"名称"},{"id":"userName","label":"负责人"},{"id":"createUser","label":"创建人"},{"id":"status","label":"当前状态"},{"id":"stage","label":"测试阶段"},{"id":"testRate","label":"测试进度"},{"id":"projectName","label":"所属项目"},{"id":"plannedStartTime","label":"计划开始"},{"id":"plannedEndTime","label":"计划结束"},{"id":"actualStartTime","label":"实际开始"},{"id":"actualEndTime","label":"实际结束"},{"id":"tags","label":"标签"},{"id":"executionTimes","label":"执行次数"},{"id":"passRate","label":"通过率"}]'; + +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V85__v1.10_permission_refactor.sql b/system-setting/backend/src/main/resources/db/migration/V85__v1.10_permission_refactor.sql index 5e8b60fdd5..6aac66dab4 100644 --- a/system-setting/backend/src/main/resources/db/migration/V85__v1.10_permission_refactor.sql +++ b/system-setting/backend/src/main/resources/db/migration/V85__v1.10_permission_refactor.sql @@ -1,3 +1,4 @@ +SET SESSION innodb_lock_wait_timeout = 7200; UPDATE user_role SET source_id = 'system' WHERE role_id = 'admin'; @@ -606,4 +607,5 @@ VALUES (UUID(), 'read_only', 'PROJECT_USER:READ', 'PROJECT_USER'); INSERT INTO user_group_permission (id, group_id, permission_id, module_id) VALUES (UUID(), 'read_only', 'PROJECT_MANAGER:READ', 'PROJECT_MANAGER'); INSERT INTO user_group_permission (id, group_id, permission_id, module_id) -VALUES (UUID(), 'read_only', 'PROJECT_OPERATING_LOG:READ', 'PROJECT_OPERATING_LOG'); \ No newline at end of file +VALUES (UUID(), 'read_only', 'PROJECT_OPERATING_LOG:READ', 'PROJECT_OPERATING_LOG'); +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V86__v1.10.1_release.sql b/system-setting/backend/src/main/resources/db/migration/V86__v1.10.1_release.sql index a4fb775cb8..d4b785134f 100644 --- a/system-setting/backend/src/main/resources/db/migration/V86__v1.10.1_release.sql +++ b/system-setting/backend/src/main/resources/db/migration/V86__v1.10.1_release.sql @@ -1,3 +1,4 @@ +SET SESSION innodb_lock_wait_timeout = 7200; -- project add column ALTER table project add system_id varchar(50) null; -- reduse old data @@ -164,3 +165,5 @@ where type = 'test_plan_scenario_case'; update system_header set props='[{"id":"num","label":"ID"},{"id":"name","label":"名称"},{"id":"createUser","label":"创建人"},{"id":"maintainer","label":"责任人"},{"id":"priority","label":"用例等级"},{"id":"reviewStatus","label":"评审状态"},{"id":"tags","label":"标签"},{"id":"nodePath","label":"所属模块"},{"id":"updateTime","label":"更新时间"}]' where type = 'test_case_list'; + +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V87__v1.10.2_release.sql b/system-setting/backend/src/main/resources/db/migration/V87__v1.10.2_release.sql index 1e85fcae26..9f9783f15a 100644 --- a/system-setting/backend/src/main/resources/db/migration/V87__v1.10.2_release.sql +++ b/system-setting/backend/src/main/resources/db/migration/V87__v1.10.2_release.sql @@ -1,2 +1,5 @@ +SET SESSION innodb_lock_wait_timeout = 7200; -- 自定义字段保存表头的key ALTER TABLE custom_field_template ADD `key` varchar(1) NULL COMMENT 'Save Table Header Key'; + +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V88__v1.10.3_release.sql b/system-setting/backend/src/main/resources/db/migration/V88__v1.10.3_release.sql index 91a9c41c70..14a39001dd 100644 --- a/system-setting/backend/src/main/resources/db/migration/V88__v1.10.3_release.sql +++ b/system-setting/backend/src/main/resources/db/migration/V88__v1.10.3_release.sql @@ -1,3 +1,4 @@ +SET SESSION innodb_lock_wait_timeout = 7200; -- 是否自定更新功能用例状态 ALTER TABLE test_plan ADD automatic_status_update TINYINT(1) DEFAULT 0 NULL COMMENT '是否自定更新功能用例状态'; @@ -5,4 +6,5 @@ ALTER TABLE test_plan alter table test_case_comment add status varchar(80) null; -- 添加使用到的url功能 -ALTER TABLE api_scenario ADD use_url LONGTEXT DEFAULT NULL COMMENT '步骤中用到的url'; \ No newline at end of file +ALTER TABLE api_scenario ADD use_url LONGTEXT DEFAULT NULL COMMENT '步骤中用到的url'; +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V89__v1.10.4_release.sql b/system-setting/backend/src/main/resources/db/migration/V89__v1.10.4_release.sql index 2607212569..e1b89f2873 100644 --- a/system-setting/backend/src/main/resources/db/migration/V89__v1.10.4_release.sql +++ b/system-setting/backend/src/main/resources/db/migration/V89__v1.10.4_release.sql @@ -1,3 +1,4 @@ +SET SESSION innodb_lock_wait_timeout = 7200; -- 添加版本号 ALTER TABLE api_scenario ADD version INT(10) DEFAULT 0 NULL COMMENT '版本号'; @@ -28,4 +29,5 @@ INSERT INTO user_group_permission (id, group_id, permission_id, module_id) VALUES (UUID(), 'project_admin', 'PROJECT_API_SCENARIO:READ+CREATE_PERFORMANCE_BATCH', 'PROJECT_API_SCENARIO'); -- 场景批量复制 INSERT INTO user_group_permission (id, group_id, permission_id, module_id) -VALUES (UUID(), 'project_admin', 'PROJECT_API_SCENARIO:READ+BATCH_COPY', 'PROJECT_API_SCENARIO'); \ No newline at end of file +VALUES (UUID(), 'project_admin', 'PROJECT_API_SCENARIO:READ+BATCH_COPY', 'PROJECT_API_SCENARIO'); +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V8__modify_test_case.sql b/system-setting/backend/src/main/resources/db/migration/V8__modify_test_case.sql index 74101fda9e..ac34b417bf 100644 --- a/system-setting/backend/src/main/resources/db/migration/V8__modify_test_case.sql +++ b/system-setting/backend/src/main/resources/db/migration/V8__modify_test_case.sql @@ -1,3 +1,4 @@ +SET SESSION innodb_lock_wait_timeout = 7200; alter table test_case add num int null comment 'Manually controlled growth identifier'; DROP PROCEDURE IF EXISTS test_cursor; @@ -47,4 +48,5 @@ END // DELIMITER ; CALL test_cursor(); -DROP PROCEDURE IF EXISTS test_cursor; \ No newline at end of file +DROP PROCEDURE IF EXISTS test_cursor; +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V90__v1.10.5_release.sql b/system-setting/backend/src/main/resources/db/migration/V90__v1.10.5_release.sql index 1f11c8ee13..efff4b0303 100644 --- a/system-setting/backend/src/main/resources/db/migration/V90__v1.10.5_release.sql +++ b/system-setting/backend/src/main/resources/db/migration/V90__v1.10.5_release.sql @@ -1 +1,3 @@ -update api_scenario set custom_num = num where (custom_num is null or custom_num = ''); \ No newline at end of file +SET SESSION innodb_lock_wait_timeout = 7200; +update api_scenario set custom_num = num where (custom_num is null or custom_num = ''); +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V91__v1.11_release.sql b/system-setting/backend/src/main/resources/db/migration/V91__v1.11_release.sql index d77a974a07..5eaa4713b5 100644 --- a/system-setting/backend/src/main/resources/db/migration/V91__v1.11_release.sql +++ b/system-setting/backend/src/main/resources/db/migration/V91__v1.11_release.sql @@ -1,2 +1,4 @@ +SET SESSION innodb_lock_wait_timeout = 7200; -- v1.10-lts 升级的基线是 v92,v91不会执行,这里把v91的内容加到这里,保证lts可以正常升级 -SELECT DATABASE(); \ No newline at end of file +SELECT DATABASE(); +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V92__v1.11.2_release.sql b/system-setting/backend/src/main/resources/db/migration/V92__v1.11.2_release.sql index 54bddbfd9e..9bfa920ede 100644 --- a/system-setting/backend/src/main/resources/db/migration/V92__v1.11.2_release.sql +++ b/system-setting/backend/src/main/resources/db/migration/V92__v1.11.2_release.sql @@ -1,3 +1,4 @@ +SET SESSION innodb_lock_wait_timeout = 7200; -- v1.10-lts 升级的基线是 v92,v91不会执行,这里把v91的内容加到这里,保证lts可以正常升级 -- test resource pool ALTER TABLE test_resource_pool @@ -126,3 +127,5 @@ CREATE TABLE IF NOT EXISTS test_plan_report_resource ( alter table project add azure_devops_id varchar(50) null after zentao_id; alter table custom_field_template modify default_value varchar(100) null ; + +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V93__v1.12_release.sql b/system-setting/backend/src/main/resources/db/migration/V93__v1.12_release.sql index 5fe9eb04b0..5a9c838d39 100644 --- a/system-setting/backend/src/main/resources/db/migration/V93__v1.12_release.sql +++ b/system-setting/backend/src/main/resources/db/migration/V93__v1.12_release.sql @@ -1,3 +1,4 @@ +SET SESSION innodb_lock_wait_timeout = 7200; -- 接口定义增加全局运行环境选择 CREATE TABLE IF NOT EXISTS `api_definition_env` ( @@ -306,3 +307,5 @@ insert into user_group_permission (id, group_id, permission_id, module_id) values (UUID(), 'project_admin', 'PROJECT_TRACK_PLAN:READ+COPY', 'PROJECT_TRACK_PLAN'); insert into user_group_permission (id, group_id, permission_id, module_id) values (UUID(), 'project_member', 'PROJECT_TRACK_PLAN:READ+COPY', 'PROJECT_TRACK_PLAN'); + +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V94__v1.12.1_release.sql b/system-setting/backend/src/main/resources/db/migration/V94__v1.12.1_release.sql index 5645d05730..aec892ced4 100644 --- a/system-setting/backend/src/main/resources/db/migration/V94__v1.12.1_release.sql +++ b/system-setting/backend/src/main/resources/db/migration/V94__v1.12.1_release.sql @@ -1,3 +1,4 @@ +SET SESSION innodb_lock_wait_timeout = 7200; -- 更新资源池 UPDATE test_resource_pool SET backend_listener = 1; @@ -16,3 +17,5 @@ insert into user_group_permission (id, group_id, permission_id, module_id) values (UUID(), 'project_member', 'PROJECT_API_DEFINITION:READ+TIMING_SYNC', 'PROJECT_API_DEFINITION'); insert into user_group_permission (id, group_id, permission_id, module_id) values (UUID(), 'project_member', 'PROJECT_PERFORMANCE_REPORT:READ+COMPARE', 'PROJECT_PERFORMANCE_REPORT'); + +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V95__v1.13_release.sql b/system-setting/backend/src/main/resources/db/migration/V95__v1.13_release.sql index c72faafac8..fdce2884f0 100644 --- a/system-setting/backend/src/main/resources/db/migration/V95__v1.13_release.sql +++ b/system-setting/backend/src/main/resources/db/migration/V95__v1.13_release.sql @@ -1,3 +1,4 @@ +SET SESSION innodb_lock_wait_timeout = 7200; CREATE TABLE `plugin` ( `id` varchar(50) NOT NULL COMMENT 'ID', `name` varchar(300) DEFAULT NULL COMMENT 'plugin name', @@ -113,3 +114,5 @@ CALL schema_change_api(); DROP PROCEDURE IF EXISTS schema_change_api; + +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V96__v1.13.1__release.sql b/system-setting/backend/src/main/resources/db/migration/V96__v1.13.1__release.sql index b9d9837c3b..d7e6f9c362 100644 --- a/system-setting/backend/src/main/resources/db/migration/V96__v1.13.1__release.sql +++ b/system-setting/backend/src/main/resources/db/migration/V96__v1.13.1__release.sql @@ -1,3 +1,4 @@ +SET SESSION innodb_lock_wait_timeout = 7200; CREATE INDEX load_test_report_test_resource_pool_id_index ON load_test_report (test_resource_pool_id); @@ -31,3 +32,5 @@ insert into user_group_permission (id, group_id, permission_id, module_id) values (UUID(), 'project_member', 'PROJECT_REPORT_ANALYSIS:READ+UPDATE', 'PROJECT_REPORT_ANALYSIS'); insert into user_group_permission (id, group_id, permission_id, module_id) values (UUID(), 'project_member', 'PROJECT_REPORT_ANALYSIS:READ+CREATE', 'PROJECT_REPORT_ANALYSIS'); + +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V97__v1.14_release.sql b/system-setting/backend/src/main/resources/db/migration/V97__v1.14_release.sql index 729ce16c65..86cf6a19fe 100644 --- a/system-setting/backend/src/main/resources/db/migration/V97__v1.14_release.sql +++ b/system-setting/backend/src/main/resources/db/migration/V97__v1.14_release.sql @@ -1,3 +1,4 @@ +SET SESSION innodb_lock_wait_timeout = 7200; ALTER TABLE test_plan DROP COLUMN principal; @@ -530,3 +531,5 @@ WHERE 1; UPDATE test_case SET status = 'Prepare' WHERE status IS NULL; + +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V98__v1.14.1_release.sql b/system-setting/backend/src/main/resources/db/migration/V98__v1.14.1_release.sql index f78e4e38d6..7d00ace86a 100644 --- a/system-setting/backend/src/main/resources/db/migration/V98__v1.14.1_release.sql +++ b/system-setting/backend/src/main/resources/db/migration/V98__v1.14.1_release.sql @@ -1,3 +1,4 @@ +SET SESSION innodb_lock_wait_timeout = 7200; ALTER TABLE mock_expect_config ADD COLUMN expect_num varchar(50); ALTER TABLE test_plan ADD COLUMN repeat_case TINYINT(1) DEFAULT 0 COMMENT '是否允许重复添加用例'; @@ -11,3 +12,5 @@ insert into user_group_permission (id, group_id, permission_id, module_id) values (UUID(), 'ws_member', 'WORKSPACE_PROJECT_MANAGER:READ+UPLOAD_JAR', 'WORKSPACE_PROJECT_MANAGER'); ALTER TABLE project ADD COLUMN azure_filter_id varchar(50) NULL COMMENT 'azure 过滤需求的 parent workItem ID'; + +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V99__v1.15_release.sql b/system-setting/backend/src/main/resources/db/migration/V99__v1.15_release.sql index 60fca2f5af..8b85996622 100644 --- a/system-setting/backend/src/main/resources/db/migration/V99__v1.15_release.sql +++ b/system-setting/backend/src/main/resources/db/migration/V99__v1.15_release.sql @@ -1,3 +1,4 @@ +SET SESSION innodb_lock_wait_timeout = 7200; CREATE TABLE `issue_follow` ( `issue_id` varchar(50) DEFAULT NULL, @@ -133,3 +134,5 @@ ALTER TABLE issues MODIFY COLUMN title varchar(300); ALTER TABLE issues MODIFY COLUMN description LONGTEXT; + +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/system-setting/backend/src/main/resources/db/migration/V9__modify_report_result.sql b/system-setting/backend/src/main/resources/db/migration/V9__modify_report_result.sql index 373576d2ed..986e1910f7 100644 --- a/system-setting/backend/src/main/resources/db/migration/V9__modify_report_result.sql +++ b/system-setting/backend/src/main/resources/db/migration/V9__modify_report_result.sql @@ -1,2 +1,5 @@ +SET SESSION innodb_lock_wait_timeout = 7200; ALTER TABLE load_test_report_result MODIFY report_value LONGTEXT NULL; + +SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/test-track/backend/src/main/resources/db/migration/V2__2.3.0_release.sql b/test-track/backend/src/main/resources/db/migration/V2__2.3.0_release.sql index 7ecaf07c07..5380bf4367 100644 --- a/test-track/backend/src/main/resources/db/migration/V2__2.3.0_release.sql +++ b/test-track/backend/src/main/resources/db/migration/V2__2.3.0_release.sql @@ -1,2 +1,7 @@ +SET SESSION innodb_lock_wait_timeout = 7200; + -- 同步缺陷定时器修改 update schedule set value = '0 0 0 * * ?', job = 'io.metersphere.job.schedule.IssueSyncJob' where id = '7a23d4db-9909-438d-9e36-58e432c8c4ae' + + +SET SESSION innodb_lock_wait_timeout = DEFAULT; \ No newline at end of file diff --git a/test-track/backend/src/main/resources/db/migration/V3__2.4.0_release.sql b/test-track/backend/src/main/resources/db/migration/V3__2.4.0_release.sql index b3aa98e48b..be18e32abb 100644 --- a/test-track/backend/src/main/resources/db/migration/V3__2.4.0_release.sql +++ b/test-track/backend/src/main/resources/db/migration/V3__2.4.0_release.sql @@ -1 +1,5 @@ -ALTER TABLE test_case_issues ADD relate_time BIGINT(13) NULL COMMENT 'relate time'; \ No newline at end of file +SET SESSION innodb_lock_wait_timeout = 7200; + +ALTER TABLE test_case_issues ADD relate_time BIGINT(13) NULL COMMENT 'relate time'; + +SET SESSION innodb_lock_wait_timeout = DEFAULT; \ No newline at end of file diff --git a/test-track/backend/src/main/resources/db/migration/V4__2.6.0_release.sql b/test-track/backend/src/main/resources/db/migration/V4__2.6.0_release.sql index d0a77bb52a..f28d8e149d 100644 --- a/test-track/backend/src/main/resources/db/migration/V4__2.6.0_release.sql +++ b/test-track/backend/src/main/resources/db/migration/V4__2.6.0_release.sql @@ -1,3 +1,5 @@ +SET SESSION innodb_lock_wait_timeout = 7200; + -- init sql -- 工单名称 v26_create_index -- 创建人 guoyuqi @@ -10,3 +12,6 @@ ALTER table custom_field ADD INDEX global_index(global); ALTER table custom_field ADD INDEX scene_index(scene); ALTER table custom_field ADD INDEX name_index(name); + + +SET SESSION innodb_lock_wait_timeout = DEFAULT; \ No newline at end of file