From 6f67696291b39030fb7d263e0cecb5240ad6441c Mon Sep 17 00:00:00 2001 From: metersphere-bot <78466014+metersphere-bot@users.noreply.github.com> Date: Wed, 16 Feb 2022 10:16:35 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E6=93=8D=E4=BD=9C=E6=97=A5=E5=BF=97):=20?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0sql=E8=84=9A=E6=9C=AC=20(#10541)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: fit2-zhao Co-authored-by: fit2-zhao <70558837+fit2-zhao@users.noreply.github.com> --- .../db/migration/V107__v1.18_release.sql | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/backend/src/main/resources/db/migration/V107__v1.18_release.sql b/backend/src/main/resources/db/migration/V107__v1.18_release.sql index 516a55e8fe..fc7b3bbfdc 100644 --- a/backend/src/main/resources/db/migration/V107__v1.18_release.sql +++ b/backend/src/main/resources/db/migration/V107__v1.18_release.sql @@ -10,6 +10,37 @@ CREATE TABLE `operating_log_resource` KEY `source_id_index` (`source_id`) ) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE utf8mb4_general_ci; +-- 操作日志 +INSERT INTO operating_log_resource ( id, operating_log_id, source_id ) +SELECT id, id AS operating_log_id, TRIM( BOTH '"' FROM source_id ) AS source_id +FROM operating_log +WHERE + source_id != '' + AND oper_type = 'UPDATE' + AND oper_module IN ( + 'API_AUTOMATION', + '接口自动化', + 'Api automation', + '接口自動化', + 'API_AUTOMATION', + '接口定义', + '接口定義', + 'Api definition', + 'API_DEFINITION', + '接口定义用例', + '接口定義用例', + 'Api definition case', + 'API_DEFINITION_CASE', + '性能测试', + '性能測試', + 'Performance test', + 'PERFORMANCE_TEST', + '测试用例', + '測試用例', + 'Test case', + 'TRACK_TEST_CASE' + ); + CREATE TABLE IF NOT EXISTS `project_application` ( `project_id` varchar(50) DEFAULT NULL,