diff --git a/api-test/backend/src/main/resources/db/migration/V4__2.4.1_release.sql b/api-test/backend/src/main/resources/db/migration/V4__2.4.1_release.sql new file mode 100644 index 0000000000..a03b3430cf --- /dev/null +++ b/api-test/backend/src/main/resources/db/migration/V4__2.4.1_release.sql @@ -0,0 +1,13 @@ +-- +-- 增加一个索引 +SELECT IF(EXISTS(SELECT DISTINCT index_name + FROM information_schema.statistics + WHERE table_schema = DATABASE() + AND table_name = 'api_definition' + AND index_name LIKE 'api_definition_module_id_status_index'), + 'select 1', + 'ALTER TABLE api_definition ADD INDEX api_definition_module_id_status_index (module_id, status)') +INTO @a; +PREPARE stmt1 FROM @a; +EXECUTE stmt1; +DEALLOCATE PREPARE stmt1; \ 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 new file mode 100644 index 0000000000..6da879cca0 --- /dev/null +++ b/performance-test/backend/src/main/resources/db/migration/V3__2.4.1_release.sql @@ -0,0 +1,13 @@ +-- +-- 增加一个索引 +SELECT IF(EXISTS(SELECT DISTINCT index_name + FROM information_schema.statistics + WHERE table_schema = DATABASE() + AND table_name = 'load_test_report_detail' + AND index_name LIKE 'load_test_report_detail_report_id_part_index'), + 'select 1', + 'ALTER TABLE load_test_report_detail ADD INDEX load_test_report_detail_report_id_part_index (report_id, part)') +INTO @a; +PREPARE stmt1 FROM @a; +EXECUTE stmt1; +DEALLOCATE PREPARE stmt1; \ No newline at end of file