From 988f13b1efaf14ab23cf24820831b57820d1f4c0 Mon Sep 17 00:00:00 2001 From: chenjianxing Date: Thu, 24 Jun 2021 21:36:07 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E8=A7=84=E8=8C=83=E5=BB=BA?= =?UTF-8?q?=E8=A1=A8=E8=AF=AD=E5=8F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../db/migration/V13__service_integration.sql | 6 +- .../resources/db/migration/V15__add_quota.sql | 3 +- .../db/migration/V17__test_plan_project.sql | 4 +- .../resources/db/migration/V18__notice.sql | 2 +- .../db/migration/V20__add_license.sql | 2 +- .../db/migration/V23__test_case_review.sql | 10 +-- .../db/migration/V2__metersphere_ddl.sql | 88 ++++++------------- .../db/migration/V34__api_test_jar.sql | 2 +- .../db/migration/V47__api_data_view.sql | 2 +- .../resources/db/migration/V4__user_key.sql | 4 +- .../db/migration/V50__api_scenario.sql | 8 +- .../db/migration/V51__api_definition.sql | 10 +-- .../db/migration/V52__test_plan_api.sql | 4 +- .../resources/db/migration/V5__schedule.sql | 48 +++++----- .../V62__add_test_plan_load_case.sql | 3 +- .../db/migration/V64__auth_source.sql | 4 +- .../migration/V66__init_test_plan_report.sql | 8 +- .../db/migration/V69__swagger_url_project.sql | 3 +- .../db/migration/V6__api_test_environment.sql | 2 +- .../db/migration/V78__v1.8_release.sql | 27 +++--- .../db/migration/V80__v1.9.0_release.sql | 22 ++--- .../db/migration/V84__v1.10_release.sql | 3 +- 22 files changed, 102 insertions(+), 163 deletions(-) diff --git a/backend/src/main/resources/db/migration/V13__service_integration.sql b/backend/src/main/resources/db/migration/V13__service_integration.sql index adcadfc4eb..80118df1ad 100644 --- a/backend/src/main/resources/db/migration/V13__service_integration.sql +++ b/backend/src/main/resources/db/migration/V13__service_integration.sql @@ -6,7 +6,7 @@ create table service_integration configuration text not null, constraint service_integration_pk primary key (id) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; +) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE utf8mb4_general_ci; create table if not exists test_case_issues ( @@ -14,7 +14,7 @@ create table if not exists test_case_issues primary key, test_case_id varchar(50) not null, issues_id varchar(100) not null -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; +) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE utf8mb4_general_ci; create table if not exists issues ( @@ -28,4 +28,4 @@ create table if not exists issues reporter varchar(50) null comment 'case issues creator', lastmodify varchar(50) null, platform varchar(50) null -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; \ No newline at end of file +) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE utf8mb4_general_ci; diff --git a/backend/src/main/resources/db/migration/V15__add_quota.sql b/backend/src/main/resources/db/migration/V15__add_quota.sql index bc1d5c4f45..814145b2fe 100644 --- a/backend/src/main/resources/db/migration/V15__add_quota.sql +++ b/backend/src/main/resources/db/migration/V15__add_quota.sql @@ -11,5 +11,4 @@ CREATE TABLE IF NOT EXISTS `quota` `use_default` tinyint(1) DEFAULT NULL, `update_time` bigint(13) DEFAULT NULL, PRIMARY KEY (`id`) -) ENGINE = InnoDB - DEFAULT CHARSET = utf8mb4 \ No newline at end of file +) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE utf8mb4_general_ci; diff --git a/backend/src/main/resources/db/migration/V17__test_plan_project.sql b/backend/src/main/resources/db/migration/V17__test_plan_project.sql index c1f57b0667..5e89c8da95 100644 --- a/backend/src/main/resources/db/migration/V17__test_plan_project.sql +++ b/backend/src/main/resources/db/migration/V17__test_plan_project.sql @@ -4,6 +4,6 @@ create table if not exists test_plan_project project_id varchar(50) null, constraint test_plan_project_pk unique (test_plan_id, project_id) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; +) 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; \ No newline at end of file +insert into test_plan_project(test_plan_id, project_id) select id test_plan_id, project_id project_id from test_plan; diff --git a/backend/src/main/resources/db/migration/V18__notice.sql b/backend/src/main/resources/db/migration/V18__notice.sql index 2d6da6b5d7..b2abbe69b7 100644 --- a/backend/src/main/resources/db/migration/V18__notice.sql +++ b/backend/src/main/resources/db/migration/V18__notice.sql @@ -4,5 +4,5 @@ CREATE TABLE IF NOT EXISTS `notice`( `NAME` VARCHAR(100) NOT NULL, `EMAIL` VARCHAR(100) NOT NULL, `ENABLE` VARCHAR(40) NOT NULL -)ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE utf8mb4_general_ci; diff --git a/backend/src/main/resources/db/migration/V20__add_license.sql b/backend/src/main/resources/db/migration/V20__add_license.sql index 56345d9064..a5e68aab0f 100644 --- a/backend/src/main/resources/db/migration/V20__add_license.sql +++ b/backend/src/main/resources/db/migration/V20__add_license.sql @@ -4,4 +4,4 @@ CREATE TABLE `license` ( `update_time` bigint(13) NOT NULL COMMENT 'Update timestamp', `license_code` longtext DEFAULT NULL COMMENT 'license_code', PRIMARY KEY (`id`) -) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4; \ No newline at end of file +) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE utf8mb4_general_ci; diff --git a/backend/src/main/resources/db/migration/V23__test_case_review.sql b/backend/src/main/resources/db/migration/V23__test_case_review.sql index da94c17066..0ae9798122 100644 --- a/backend/src/main/resources/db/migration/V23__test_case_review.sql +++ b/backend/src/main/resources/db/migration/V23__test_case_review.sql @@ -7,7 +7,7 @@ create table if not exists test_case_comment author varchar(50) null, create_time bigint(13) null, update_time bigint(13) null -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE utf8mb4_general_ci; create table if not exists test_case_review ( @@ -20,7 +20,7 @@ create table if not exists test_case_review update_time bigint(13) null, end_time bigint(13) null, description text null -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE utf8mb4_general_ci; create table if not exists test_case_review_project ( @@ -28,7 +28,7 @@ create table if not exists test_case_review_project project_id varchar(50) null, constraint test_case_review_project_pk unique (review_id, project_id) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE utf8mb4_general_ci; create table if not exists test_case_review_test_case ( @@ -41,7 +41,7 @@ create table if not exists test_case_review_test_case reviewer varchar(64) null, create_time bigint(13) null, update_time bigint(13) null -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE utf8mb4_general_ci; create table if not exists test_case_review_users ( @@ -49,6 +49,6 @@ create table if not exists test_case_review_users user_id varchar(50) null, constraint test_case_review_users_pk unique (review_id, user_id) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE utf8mb4_general_ci; diff --git a/backend/src/main/resources/db/migration/V2__metersphere_ddl.sql b/backend/src/main/resources/db/migration/V2__metersphere_ddl.sql index df787a2b62..8bec0988f0 100644 --- a/backend/src/main/resources/db/migration/V2__metersphere_ddl.sql +++ b/backend/src/main/resources/db/migration/V2__metersphere_ddl.sql @@ -2,9 +2,7 @@ CREATE TABLE IF NOT EXISTS `file_content` ( `file_id` varchar(64) NOT NULL COMMENT 'File ID', `file` longblob COMMENT 'File content', PRIMARY KEY (`file_id`) -) - ENGINE = InnoDB - DEFAULT CHARSET = utf8mb4; +) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE utf8mb4_general_ci; CREATE TABLE IF NOT EXISTS `file_metadata` ( `id` varchar(64) NOT NULL COMMENT 'File ID', @@ -14,7 +12,7 @@ CREATE TABLE IF NOT EXISTS `file_metadata` ( `create_time` bigint(13) NOT NULL COMMENT 'Create timestamp', `update_time` bigint(13) NOT NULL COMMENT 'Update timestamp', PRIMARY KEY (`id`) -) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4; +) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE utf8mb4_general_ci; CREATE TABLE `load_test` ( `id` varchar(50) NOT NULL COMMENT 'Test ID', @@ -30,13 +28,13 @@ CREATE TABLE `load_test` ( `test_resource_pool_id` varchar(50) DEFAULT NULL, `user_id` varchar(64) DEFAULT NULL, PRIMARY KEY (`id`) -) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4; +) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE utf8mb4_general_ci; CREATE TABLE IF NOT EXISTS `load_test_file` ( `test_id` varchar(64) DEFAULT NULL, `file_id` varchar(64) DEFAULT NULL, UNIQUE KEY `load_test_file_unique_key` (`test_id`, `file_id`) -) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COMMENT ='测试和文件的关联表'; +) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE utf8mb4_general_ci COMMENT ='测试和文件的关联表'; CREATE TABLE `load_test_report` ( `id` varchar(50) NOT NULL COMMENT 'Test report ID', @@ -48,14 +46,14 @@ CREATE TABLE `load_test_report` ( `status` varchar(64) NOT NULL COMMENT 'Status of this test run', `user_id` varchar(64) DEFAULT NULL, PRIMARY KEY (`id`) -) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4; +) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE utf8mb4_general_ci; CREATE TABLE IF NOT EXISTS `load_test_report_detail` ( `report_id` varchar(50) NOT NULL, `content` longtext, `part` bigint(11) NOT NULL, PRIMARY KEY (`report_id`,`part`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; +) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE utf8mb4_general_ci; CREATE TABLE IF NOT EXISTS `load_test_report_log` ( `id` varchar(50) NOT NULL, @@ -65,7 +63,7 @@ CREATE TABLE IF NOT EXISTS `load_test_report_log` ( `part` bigint(20) DEFAULT NULL, PRIMARY KEY (`id`), KEY `load_test_report_log_report_id_resource_name_index` (`report_id`,`resource_id`,`part`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; +) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE utf8mb4_general_ci; CREATE TABLE IF NOT EXISTS `load_test_report_result` ( `id` varchar(50) NOT NULL, @@ -74,7 +72,7 @@ CREATE TABLE IF NOT EXISTS `load_test_report_result` ( `report_value` text , PRIMARY KEY (`id`), KEY `load_test_report_result_report_id_report_key_index` (`report_id`,`report_key`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; +) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE utf8mb4_general_ci; CREATE TABLE IF NOT EXISTS `organization` ( @@ -84,10 +82,7 @@ CREATE TABLE IF NOT EXISTS `organization` ( `create_time` bigint(13) NOT NULL COMMENT 'Create timestamp', `update_time` bigint(13) NOT NULL COMMENT 'Update timestamp', PRIMARY KEY (`id`) -) - ENGINE = InnoDB - DEFAULT CHARSET = utf8mb4 - ; +) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE utf8mb4_general_ci; CREATE TABLE IF NOT EXISTS `project` ( `id` varchar(50) NOT NULL COMMENT 'Project ID', @@ -97,10 +92,7 @@ CREATE TABLE IF NOT EXISTS `project` ( `create_time` bigint(13) NOT NULL COMMENT 'Create timestamp', `update_time` bigint(13) NOT NULL COMMENT 'Update timestamp', PRIMARY KEY (`id`) -) - ENGINE = InnoDB - DEFAULT CHARSET = utf8mb4 - ; +) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE utf8mb4_general_ci; CREATE TABLE IF NOT EXISTS `role` ( `id` varchar(50) NOT NULL COMMENT 'Role ID', @@ -110,9 +102,7 @@ CREATE TABLE IF NOT EXISTS `role` ( `create_time` bigint(13) NOT NULL COMMENT 'Create timestamp', `update_time` bigint(13) NOT NULL COMMENT 'Update timestamp', PRIMARY KEY (`id`) -) - ENGINE = InnoDB - DEFAULT CHARSET = utf8mb4; +) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE utf8mb4_general_ci; CREATE TABLE IF NOT EXISTS `system_parameter` ( `param_key` varchar(64) CHARACTER SET utf8mb4 NOT NULL COMMENT 'Parameter name', @@ -120,9 +110,7 @@ CREATE TABLE IF NOT EXISTS `system_parameter` ( `type` varchar(100) NOT NULL DEFAULT 'text' COMMENT 'Parameter type', `sort` int(5) DEFAULT NULL COMMENT 'Sort', PRIMARY KEY (`param_key`) -) - ENGINE = InnoDB - DEFAULT CHARSET = utf8mb4; +) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE utf8mb4_general_ci; CREATE TABLE IF NOT EXISTS `test_resource` ( `id` varchar(50) NOT NULL COMMENT 'Test resource ID', @@ -132,9 +120,7 @@ CREATE TABLE IF NOT EXISTS `test_resource` ( `create_time` bigint(13) NOT NULL COMMENT 'Create timestamp', `update_time` bigint(13) NOT NULL COMMENT 'Update timestamp', PRIMARY KEY (`id`) -) - ENGINE = InnoDB - DEFAULT CHARSET = utf8mb4; +) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE utf8mb4_general_ci; CREATE TABLE IF NOT EXISTS `test_resource_pool` ( `id` varchar(50) NOT NULL COMMENT 'Test resource pool ID', @@ -145,9 +131,7 @@ CREATE TABLE IF NOT EXISTS `test_resource_pool` ( `create_time` bigint(13) NOT NULL COMMENT 'Create timestamp', `update_time` bigint(13) NOT NULL COMMENT 'Update timestamp', PRIMARY KEY (`id`) -) - ENGINE = InnoDB - DEFAULT CHARSET = utf8mb4; +) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE utf8mb4_general_ci; CREATE TABLE IF NOT EXISTS `user` ( `id` varchar(50) COLLATE utf8mb4_bin NOT NULL COMMENT 'User ID', @@ -162,9 +146,7 @@ CREATE TABLE IF NOT EXISTS `user` ( `last_organization_id` varchar(50) DEFAULT NULL, `phone` varchar(50) DEFAULT NULL COMMENT 'Phone number of user', PRIMARY KEY (`id`) -) - ENGINE = InnoDB - DEFAULT CHARSET = utf8mb4; +) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE utf8mb4_general_ci; CREATE TABLE IF NOT EXISTS `user_role` ( `id` varchar(50) NOT NULL COMMENT 'ID of user''s role info', @@ -174,9 +156,7 @@ CREATE TABLE IF NOT EXISTS `user_role` ( `create_time` bigint(13) NOT NULL COMMENT 'Create timestamp', `update_time` bigint(13) NOT NULL COMMENT 'Update timestamp', PRIMARY KEY (`id`) -) - ENGINE = InnoDB - DEFAULT CHARSET = utf8mb4; +) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE utf8mb4_general_ci; CREATE TABLE IF NOT EXISTS `workspace` ( `id` varchar(50) NOT NULL COMMENT 'Workspace ID ', @@ -186,9 +166,7 @@ CREATE TABLE IF NOT EXISTS `workspace` ( `create_time` bigint(13) NOT NULL COMMENT 'Create timestamp', `update_time` bigint(13) NOT NULL COMMENT 'Update timestamp', PRIMARY KEY (`id`) -) - ENGINE = InnoDB - DEFAULT CHARSET = utf8mb4; +) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE utf8mb4_general_ci; -- api start @@ -210,7 +188,7 @@ CREATE TABLE IF NOT EXISTS `api_test_file` ( `test_id` varchar(64) DEFAULT NULL, `file_id` varchar(64) DEFAULT NULL, UNIQUE KEY `api_test_file_unique_key` (`test_id`, `file_id`) -) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COMMENT ='Api test test file relevance table'; +) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE utf8mb4_general_ci COMMENT ='Api test test file relevance table'; CREATE TABLE IF NOT EXISTS `api_test_report` ( `id` varchar(50) NOT NULL COMMENT 'Test report ID', @@ -222,16 +200,14 @@ CREATE TABLE IF NOT EXISTS `api_test_report` ( `status` varchar(64) NOT NULL COMMENT 'Status of this test run', `user_id` varchar(64) DEFAULT NULL COMMENT 'User ID', PRIMARY KEY (`id`) -) - ENGINE = InnoDB - DEFAULT CHARSET = utf8mb4; +) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE utf8mb4_general_ci; CREATE TABLE IF NOT EXISTS `api_test_report_detail` ( `report_id` varchar(64) NOT NULL COMMENT 'API Test Report ID', `test_id` varchar(64) NOT NULL COMMENT 'Test ID', `content` longblob COMMENT 'Report content', PRIMARY KEY (`report_id`) -) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4; +) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE utf8mb4_general_ci; -- api end @@ -253,9 +229,7 @@ CREATE TABLE IF NOT EXISTS `test_plan` ( `create_time` bigint(13) NOT NULL COMMENT 'Create timestamp', `update_time` bigint(13) NOT NULL COMMENT 'Update timestamp', PRIMARY KEY (`id`) -) - ENGINE = InnoDB - DEFAULT CHARSET = utf8mb4; +) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE utf8mb4_general_ci; CREATE TABLE IF NOT EXISTS `test_case_node` ( @@ -267,9 +241,7 @@ CREATE TABLE IF NOT EXISTS `test_case_node` ( `create_time` bigint(13) NOT NULL COMMENT 'Create timestamp', `update_time` bigint(13) NOT NULL COMMENT 'Update timestamp', PRIMARY KEY (`id`) -) - ENGINE = InnoDB - DEFAULT CHARSET = utf8mb4; +) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE utf8mb4_general_ci; CREATE TABLE IF NOT EXISTS `test_case` ( @@ -289,9 +261,7 @@ CREATE TABLE IF NOT EXISTS `test_case` ( `create_time` bigint(13) NOT NULL COMMENT 'Create timestamp', `update_time` bigint(13) NOT NULL COMMENT 'Update timestamp', PRIMARY KEY (`id`) -) - ENGINE = InnoDB - DEFAULT CHARSET = utf8mb4; +) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE utf8mb4_general_ci; CREATE TABLE IF NOT EXISTS `test_plan_test_case` ( @@ -307,9 +277,7 @@ CREATE TABLE IF NOT EXISTS `test_plan_test_case` ( `create_time` bigint(13) NOT NULL COMMENT 'Create timestamp', `update_time` bigint(13) NOT NULL COMMENT 'Update timestamp', PRIMARY KEY (`id`) -) - ENGINE = InnoDB - DEFAULT CHARSET = utf8mb4; +) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE utf8mb4_general_ci; CREATE TABLE IF NOT EXISTS `test_case_report_template` ( `id` varchar(50) NOT NULL, @@ -317,9 +285,7 @@ CREATE TABLE IF NOT EXISTS `test_case_report_template` ( `workspace_id` varchar(50) DEFAULT NULL COMMENT 'Workspace ID this project belongs to', `content` longtext COMMENT 'Template content (JSON format)', PRIMARY KEY (`id`) -) - ENGINE=InnoDB - DEFAULT CHARSET=utf8mb4; +) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE utf8mb4_general_ci; CREATE TABLE IF NOT EXISTS `test_case_report` ( `id` varchar(50) NOT NULL, @@ -328,9 +294,7 @@ CREATE TABLE IF NOT EXISTS `test_case_report` ( `start_time` bigint(13) COMMENT 'Test start time', `end_time` bigint(13) COMMENT 'Test end time', PRIMARY KEY (`id`) -) - ENGINE=InnoDB - DEFAULT CHARSET=utf8mb4; +) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE utf8mb4_general_ci; -- track end diff --git a/backend/src/main/resources/db/migration/V34__api_test_jar.sql b/backend/src/main/resources/db/migration/V34__api_test_jar.sql index b6bc46c2e6..0b84c49610 100644 --- a/backend/src/main/resources/db/migration/V34__api_test_jar.sql +++ b/backend/src/main/resources/db/migration/V34__api_test_jar.sql @@ -10,4 +10,4 @@ CREATE TABLE IF NOT EXISTS `jar_config` ( `create_time` bigint(13) NOT NULL COMMENT 'Create timestamp', `update_time` bigint(13) NOT NULL COMMENT 'Update timestamp', PRIMARY KEY (`id`) -) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4; \ No newline at end of file +) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE utf8mb4_general_ci; diff --git a/backend/src/main/resources/db/migration/V47__api_data_view.sql b/backend/src/main/resources/db/migration/V47__api_data_view.sql index 74ff59be4f..6976cbb28a 100644 --- a/backend/src/main/resources/db/migration/V47__api_data_view.sql +++ b/backend/src/main/resources/db/migration/V47__api_data_view.sql @@ -9,4 +9,4 @@ CREATE TABLE IF NOT EXISTS `api_data_view` response_time varchar(20) default '0' NULL, create_time timestamp default CURRENT_TIMESTAMP NOT NULL, update_time timestamp default CURRENT_TIMESTAMP NOT NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; \ No newline at end of file +) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE utf8mb4_general_ci; diff --git a/backend/src/main/resources/db/migration/V4__user_key.sql b/backend/src/main/resources/db/migration/V4__user_key.sql index 99f031d8b9..3bdb7015f4 100644 --- a/backend/src/main/resources/db/migration/V4__user_key.sql +++ b/backend/src/main/resources/db/migration/V4__user_key.sql @@ -8,7 +8,5 @@ CREATE TABLE `user_key` ( PRIMARY KEY (`id`), UNIQUE KEY `IDX_AK` (`access_key`), KEY `IDX_USER_ID` (`user_id`) -) - ENGINE = InnoDB - DEFAULT CHARSET = utf8mb4; +) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE utf8mb4_general_ci; diff --git a/backend/src/main/resources/db/migration/V50__api_scenario.sql b/backend/src/main/resources/db/migration/V50__api_scenario.sql index 7afc0d42ac..6b99f109c0 100644 --- a/backend/src/main/resources/db/migration/V50__api_scenario.sql +++ b/backend/src/main/resources/db/migration/V50__api_scenario.sql @@ -23,7 +23,7 @@ CREATE TABLE `api_scenario` ( `last_result` varchar(100) DEFAULT NULL, `report_id` varchar(50) DEFAULT NULL, PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; +) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE utf8mb4_general_ci; CREATE TABLE `api_scenario_module` ( @@ -36,7 +36,7 @@ CREATE TABLE `api_scenario_module` ( `create_time` bigint(13) NOT NULL COMMENT 'Create timestamp', `update_time` bigint(13) NOT NULL COMMENT 'Update timestamp', PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; +) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE utf8mb4_general_ci; CREATE TABLE `api_scenario_report` ( @@ -51,11 +51,11 @@ CREATE TABLE `api_scenario_report` ( `trigger_mode` varchar(64) DEFAULT NULL, `execute_type` varchar(200) NULL, PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; +) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE utf8mb4_general_ci; CREATE TABLE `api_scenario_report_detail` ( `report_id` varchar(64) NOT NULL COMMENT 'API Test Report ID', `project_id` varchar(64) NOT NULL COMMENT 'scenario ID', `content` longblob COMMENT 'Report Content', PRIMARY KEY (`report_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; \ No newline at end of file +) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE utf8mb4_general_ci; diff --git a/backend/src/main/resources/db/migration/V51__api_definition.sql b/backend/src/main/resources/db/migration/V51__api_definition.sql index 223818b694..ad4465de88 100644 --- a/backend/src/main/resources/db/migration/V51__api_definition.sql +++ b/backend/src/main/resources/db/migration/V51__api_definition.sql @@ -9,9 +9,7 @@ CREATE TABLE IF NOT EXISTS `api_module` ( `create_time` bigint(13) NOT NULL COMMENT 'Create timestamp', `update_time` bigint(13) NOT NULL COMMENT 'Update timestamp', PRIMARY KEY (`id`) -) - ENGINE = InnoDB - DEFAULT CHARSET = utf8mb4; +) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE utf8mb4_general_ci; CREATE TABLE IF NOT EXISTS `api_definition` ( `id` varchar(50) NOT NULL COMMENT 'Test ID', @@ -32,7 +30,7 @@ CREATE TABLE IF NOT EXISTS `api_definition` ( `create_time` bigint(13) NOT NULL COMMENT 'Create timestamp', `update_time` bigint(13) NOT NULL COMMENT 'Update timestamp', PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; +) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE utf8mb4_general_ci; CREATE TABLE IF NOT EXISTS `api_test_case` ( `id` varchar(50) NOT NULL COMMENT 'Test ID', @@ -48,7 +46,7 @@ CREATE TABLE IF NOT EXISTS `api_test_case` ( `create_time` bigint(13) NOT NULL COMMENT 'Create timestamp', `update_time` bigint(13) NOT NULL COMMENT 'Update timestamp', PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; +) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE utf8mb4_general_ci; CREATE TABLE IF NOT EXISTS `api_definition_exec_result` ( `id` varchar(50) NOT NULL COMMENT 'Test ID', @@ -61,7 +59,7 @@ CREATE TABLE IF NOT EXISTS `api_definition_exec_result` ( `end_time` bigint(13) NOT NULL COMMENT 'Update timestamp', `create_time` bigint(13) NULL COMMENT 'Create time', PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; +) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE utf8mb4_general_ci; ALTER TABLE `api_definition` ADD INDEX ( `user_id` ); ALTER TABLE `api_definition` ADD INDEX ( `project_id` ); diff --git a/backend/src/main/resources/db/migration/V52__test_plan_api.sql b/backend/src/main/resources/db/migration/V52__test_plan_api.sql index 91cff8223e..86e5fb66df 100644 --- a/backend/src/main/resources/db/migration/V52__test_plan_api.sql +++ b/backend/src/main/resources/db/migration/V52__test_plan_api.sql @@ -8,7 +8,7 @@ CREATE TABLE IF NOT EXISTS `test_plan_api_case` ( `update_time` bigint(13) NOT NULL COMMENT 'Update timestamp', PRIMARY KEY (`id`), UNIQUE KEY `plan_id_case_id` (`test_plan_id`, `api_case_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; +) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE utf8mb4_general_ci; CREATE TABLE IF NOT EXISTS `test_plan_api_scenario` ( @@ -24,6 +24,6 @@ CREATE TABLE IF NOT EXISTS `test_plan_api_scenario` ( `report_id` varchar(50) DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `plan_id_scenario_id` (`test_plan_id`, `api_scenario_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; +) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE utf8mb4_general_ci; ALTER TABLE api_definition_exec_result ADD `type` varchar(20) NULL; diff --git a/backend/src/main/resources/db/migration/V5__schedule.sql b/backend/src/main/resources/db/migration/V5__schedule.sql index 41f7e62cd6..887db3fe63 100644 --- a/backend/src/main/resources/db/migration/V5__schedule.sql +++ b/backend/src/main/resources/db/migration/V5__schedule.sql @@ -1,5 +1,5 @@ -- quartz start -CREATE TABLE `qrtz_job_details` ( +CREATE TABLE `QRTZ_JOB_DETAILS` ( `SCHED_NAME` varchar(120) NOT NULL, `JOB_NAME` varchar(200) NOT NULL, `JOB_GROUP` varchar(200) NOT NULL, @@ -13,9 +13,9 @@ CREATE TABLE `qrtz_job_details` ( PRIMARY KEY (`SCHED_NAME`,`JOB_NAME`,`JOB_GROUP`), KEY `IDX_QRTZ_J_REQ_RECOVERY` (`SCHED_NAME`,`REQUESTS_RECOVERY`), KEY `IDX_QRTZ_J_GRP` (`SCHED_NAME`,`JOB_GROUP`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; +) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE utf8mb4_general_ci; -CREATE TABLE `qrtz_triggers` ( +CREATE TABLE `QRTZ_TRIGGERS` ( `SCHED_NAME` varchar(120) NOT NULL, `TRIGGER_NAME` varchar(200) NOT NULL, `TRIGGER_GROUP` varchar(200) NOT NULL, @@ -46,9 +46,9 @@ CREATE TABLE `qrtz_triggers` ( KEY `IDX_QRTZ_T_NFT_ST_MISFIRE` (`SCHED_NAME`,`MISFIRE_INSTR`,`NEXT_FIRE_TIME`,`TRIGGER_STATE`), KEY `IDX_QRTZ_T_NFT_ST_MISFIRE_GRP` (`SCHED_NAME`,`MISFIRE_INSTR`,`NEXT_FIRE_TIME`,`TRIGGER_GROUP`,`TRIGGER_STATE`), CONSTRAINT `qrtz_triggers_ibfk_1` FOREIGN KEY (`SCHED_NAME`, `JOB_NAME`, `JOB_GROUP`) REFERENCES `qrtz_job_details` (`SCHED_NAME`, `JOB_NAME`, `JOB_GROUP`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; +) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE utf8mb4_general_ci; -CREATE TABLE `qrtz_blob_triggers` ( +CREATE TABLE `QRTZ_BLOB_TRIGGERS` ( `SCHED_NAME` varchar(120) NOT NULL, `TRIGGER_NAME` varchar(200) NOT NULL, `TRIGGER_GROUP` varchar(200) NOT NULL, @@ -56,16 +56,16 @@ CREATE TABLE `qrtz_blob_triggers` ( PRIMARY KEY (`SCHED_NAME`,`TRIGGER_NAME`,`TRIGGER_GROUP`), KEY `SCHED_NAME` (`SCHED_NAME`,`TRIGGER_NAME`,`TRIGGER_GROUP`), CONSTRAINT `qrtz_blob_triggers_ibfk_1` FOREIGN KEY (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) REFERENCES `qrtz_triggers` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; +) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE utf8mb4_general_ci; -CREATE TABLE `qrtz_calendars` ( +CREATE TABLE `QRTZ_CALENDARS` ( `SCHED_NAME` varchar(120) NOT NULL, `CALENDAR_NAME` varchar(200) NOT NULL, `CALENDAR` blob NOT NULL, PRIMARY KEY (`SCHED_NAME`,`CALENDAR_NAME`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; +) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE utf8mb4_general_ci; -CREATE TABLE `qrtz_cron_triggers` ( +CREATE TABLE `QRTZ_CRON_TRIGGERS` ( `SCHED_NAME` varchar(120) NOT NULL, `TRIGGER_NAME` varchar(200) NOT NULL, `TRIGGER_GROUP` varchar(200) NOT NULL, @@ -73,9 +73,9 @@ CREATE TABLE `qrtz_cron_triggers` ( `TIME_ZONE_ID` varchar(80) DEFAULT NULL, PRIMARY KEY (`SCHED_NAME`,`TRIGGER_NAME`,`TRIGGER_GROUP`), CONSTRAINT `qrtz_cron_triggers_ibfk_1` FOREIGN KEY (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) REFERENCES `qrtz_triggers` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; +) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE utf8mb4_general_ci; -CREATE TABLE `qrtz_fired_triggers` ( +CREATE TABLE `QRTZ_FIRED_TRIGGERS` ( `SCHED_NAME` varchar(120) NOT NULL, `ENTRY_ID` varchar(95) NOT NULL, `TRIGGER_NAME` varchar(200) NOT NULL, @@ -96,29 +96,29 @@ CREATE TABLE `qrtz_fired_triggers` ( KEY `IDX_QRTZ_FT_JG` (`SCHED_NAME`,`JOB_GROUP`), KEY `IDX_QRTZ_FT_T_G` (`SCHED_NAME`,`TRIGGER_NAME`,`TRIGGER_GROUP`), KEY `IDX_QRTZ_FT_TG` (`SCHED_NAME`,`TRIGGER_GROUP`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; +) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE utf8mb4_general_ci; -CREATE TABLE `qrtz_locks` ( +CREATE TABLE `QRTZ_LOCKS` ( `SCHED_NAME` varchar(120) NOT NULL, `LOCK_NAME` varchar(40) NOT NULL, PRIMARY KEY (`SCHED_NAME`,`LOCK_NAME`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; +) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE utf8mb4_general_ci; -CREATE TABLE `qrtz_paused_trigger_grps` ( +CREATE TABLE `QRTZ_PAUSED_TRIGGER_GRPS` ( `SCHED_NAME` varchar(120) NOT NULL, `TRIGGER_GROUP` varchar(200) NOT NULL, PRIMARY KEY (`SCHED_NAME`,`TRIGGER_GROUP`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; +) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE utf8mb4_general_ci; -CREATE TABLE `qrtz_scheduler_state` ( +CREATE TABLE `QRTZ_SCHEDULER_STATE` ( `SCHED_NAME` varchar(120) NOT NULL, `INSTANCE_NAME` varchar(200) NOT NULL, `LAST_CHECKIN_TIME` bigint(13) NOT NULL, `CHECKIN_INTERVAL` bigint(13) NOT NULL, PRIMARY KEY (`SCHED_NAME`,`INSTANCE_NAME`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; +) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE utf8mb4_general_ci; -CREATE TABLE `qrtz_simple_triggers` ( +CREATE TABLE `QRTZ_SIMPLE_TRIGGERS` ( `SCHED_NAME` varchar(120) NOT NULL, `TRIGGER_NAME` varchar(200) NOT NULL, `TRIGGER_GROUP` varchar(200) NOT NULL, @@ -127,9 +127,9 @@ CREATE TABLE `qrtz_simple_triggers` ( `TIMES_TRIGGERED` bigint(10) NOT NULL, PRIMARY KEY (`SCHED_NAME`,`TRIGGER_NAME`,`TRIGGER_GROUP`), CONSTRAINT `qrtz_simple_triggers_ibfk_1` FOREIGN KEY (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) REFERENCES `qrtz_triggers` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; +) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE utf8mb4_general_ci; -CREATE TABLE `qrtz_simprop_triggers` ( +CREATE TABLE `QRTZ_SIMPROP_TRIGGERS` ( `SCHED_NAME` varchar(120) NOT NULL, `TRIGGER_NAME` varchar(200) NOT NULL, `TRIGGER_GROUP` varchar(200) NOT NULL, @@ -146,7 +146,7 @@ CREATE TABLE `qrtz_simprop_triggers` ( `BOOL_PROP_2` varchar(1) DEFAULT NULL, PRIMARY KEY (`SCHED_NAME`,`TRIGGER_NAME`,`TRIGGER_GROUP`), CONSTRAINT `qrtz_simprop_triggers_ibfk_1` FOREIGN KEY (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) REFERENCES `qrtz_triggers` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; +) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE utf8mb4_general_ci; -- quartz end @@ -163,7 +163,7 @@ CREATE TABLE IF NOT EXISTS `schedule` ( `custom_data` longtext COMMENT 'Custom Data (JSON format)', PRIMARY KEY (`id`), KEY `resource_id` ( `resource_id` ) -) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4; +) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE utf8mb4_general_ci; ALTER TABLE `api_test` DROP COLUMN `schedule`; ALTER TABLE `load_test` DROP COLUMN `schedule`; @@ -172,4 +172,4 @@ ALTER TABLE `load_test_report` ADD `trigger_mode` varchar(64) NULL; 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'; \ No newline at end of file +alter table test_case add sort int null comment 'Import test case sort'; diff --git a/backend/src/main/resources/db/migration/V62__add_test_plan_load_case.sql b/backend/src/main/resources/db/migration/V62__add_test_plan_load_case.sql index 26abd8af0c..d0b4ce751f 100644 --- a/backend/src/main/resources/db/migration/V62__add_test_plan_load_case.sql +++ b/backend/src/main/resources/db/migration/V62__add_test_plan_load_case.sql @@ -9,5 +9,4 @@ CREATE TABLE IF NOT EXISTS `test_plan_load_case` `update_time` bigint(13) NOT NULL COMMENT 'Update timestamp', PRIMARY KEY (`id`), UNIQUE KEY `plan_load_case_id` (`test_plan_id`, `load_case_id`) -) ENGINE = InnoDB - DEFAULT CHARSET = utf8mb4; \ No newline at end of file +) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE utf8mb4_general_ci; diff --git a/backend/src/main/resources/db/migration/V64__auth_source.sql b/backend/src/main/resources/db/migration/V64__auth_source.sql index 9145d8d099..d1ea87daa1 100644 --- a/backend/src/main/resources/db/migration/V64__auth_source.sql +++ b/backend/src/main/resources/db/migration/V64__auth_source.sql @@ -8,7 +8,5 @@ CREATE TABLE IF NOT EXISTS `auth_source` ( `name` varchar(60) DEFAULT NULL, `type` varchar(30) DEFAULT NULL, PRIMARY KEY (`id`) -) - ENGINE = InnoDB - DEFAULT CHARSET = utf8mb4; +) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE utf8mb4_general_ci; diff --git a/backend/src/main/resources/db/migration/V66__init_test_plan_report.sql b/backend/src/main/resources/db/migration/V66__init_test_plan_report.sql index 576f2df200..f144c42f6d 100644 --- a/backend/src/main/resources/db/migration/V66__init_test_plan_report.sql +++ b/backend/src/main/resources/db/migration/V66__init_test_plan_report.sql @@ -15,9 +15,7 @@ CREATE TABLE IF NOT EXISTS `test_plan_report` ( `principal` VARCHAR ( 50 ) DEFAULT NULL COMMENT 'principal', PRIMARY KEY ( `id` ), UNIQUE KEY `executeInfoID` ( `test_plan_id`, `create_time` ) -) - ENGINE = INNODB - DEFAULT CHARSET = utf8mb4; +) ENGINE = INNODB DEFAULT CHARSET = utf8mb4 COLLATE utf8mb4_general_ci; CREATE TABLE IF NOT EXISTS `test_plan_report_data` ( `id` VARCHAR ( 50 ) NOT NULL COMMENT 'ID', @@ -31,6 +29,4 @@ CREATE TABLE IF NOT EXISTS `test_plan_report_data` ( `issues_info` longtext COMMENT 'issues (JSON format)', PRIMARY KEY ( `id` ), UNIQUE KEY `test_plan_report_id` ( `test_plan_report_id` ) -) - ENGINE = INNODB - DEFAULT CHARSET = utf8mb4; \ No newline at end of file +) ENGINE = INNODB DEFAULT CHARSET = utf8mb4 COLLATE utf8mb4_general_ci; diff --git a/backend/src/main/resources/db/migration/V69__swagger_url_project.sql b/backend/src/main/resources/db/migration/V69__swagger_url_project.sql index 1967c41cbb..5510a03b3d 100644 --- a/backend/src/main/resources/db/migration/V69__swagger_url_project.sql +++ b/backend/src/main/resources/db/migration/V69__swagger_url_project.sql @@ -7,6 +7,5 @@ create table swagger_url_project module_path varchar(255) null, mode_id varchar(30) null, primary key (id) -) ENGINE = InnoDB - DEFAULT CHARSET = utf8mb4; +) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE utf8mb4_general_ci; diff --git a/backend/src/main/resources/db/migration/V6__api_test_environment.sql b/backend/src/main/resources/db/migration/V6__api_test_environment.sql index 02c5a1473a..1e0bba1813 100644 --- a/backend/src/main/resources/db/migration/V6__api_test_environment.sql +++ b/backend/src/main/resources/db/migration/V6__api_test_environment.sql @@ -11,4 +11,4 @@ CREATE TABLE IF NOT EXISTS `api_test_environment` ( `custom_data` longtext COMMENT 'Custom Data (JSON format)', PRIMARY KEY (`id`), KEY `project_id` ( `project_id` ) -) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4; +) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE utf8mb4_general_ci; diff --git a/backend/src/main/resources/db/migration/V78__v1.8_release.sql b/backend/src/main/resources/db/migration/V78__v1.8_release.sql index 95acfbcdc1..df2a0b4739 100644 --- a/backend/src/main/resources/db/migration/V78__v1.8_release.sql +++ b/backend/src/main/resources/db/migration/V78__v1.8_release.sql @@ -7,8 +7,8 @@ CREATE TABLE IF NOT EXISTS `user_header` type varchar(150) null, constraint user_header_pk primary key (id) -) ENGINE = InnoDB - DEFAULT CHARSET = utf8mb4; +) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE utf8mb4_general_ci; + -- create table test_case_review_api_case create table test_case_review_api_case ( @@ -20,8 +20,8 @@ create table test_case_review_api_case create_time bigint(13) null, update_time bigint(13) null, primary key (id) -) ENGINE = InnoDB - DEFAULT CHARSET = utf8mb4; +) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE utf8mb4_general_ci; + -- create table test_case_review_scenario create table test_case_review_scenario ( @@ -36,8 +36,8 @@ create table test_case_review_scenario last_result varchar(100) null, report_id varchar(50) null, primary key (id) -) ENGINE = InnoDB - DEFAULT CHARSET = utf8mb4; +) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE utf8mb4_general_ci; + -- create table test_case_review_load create table test_case_review_load ( @@ -49,8 +49,8 @@ create table test_case_review_load update_time bigint(13) null, load_report_id varchar(50) null, primary key (id) -) ENGINE = InnoDB - DEFAULT CHARSET = utf8mb4; +) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE utf8mb4_general_ci; + -- test_resource_pool add column ALTER TABLE test_resource_pool ADD heap VARCHAR(200) NULL; ALTER TABLE test_resource_pool ADD gc_algo VARCHAR(200) NULL; @@ -170,8 +170,8 @@ CREATE TABLE IF NOT EXISTS `esb_api_params` backed_script LONGTEXT null, primary key (id), UNIQUE KEY `resource_id` (`resource_id`) -) ENGINE = InnoDB - DEFAULT CHARSET = utf8mb4; +) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE utf8mb4_general_ci; + -- add execution_times testPlan alter table test_plan add execution_times int null; @@ -187,8 +187,7 @@ CREATE TABLE IF NOT EXISTS test_case_test create_time bigint(13) null, update_time bigint(13) null, UNIQUE KEY test_case_test_unique_key (test_case_id, test_id) -) ENGINE = InnoDB - DEFAULT CHARSET = utf8mb4 COMMENT ='测试用例和关联用例的关系表'; +) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE utf8mb4_general_ci COMMENT ='测试用例和关联用例的关系表'; alter table test_case modify test_id varchar(2000) null; @@ -207,8 +206,8 @@ create table system_header type varchar(150) null, props varchar(1000) null -)ENGINE = InnoDB - DEFAULT CHARSET = utf8mb4; +) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE utf8mb4_general_ci; + -- init system_header insert into system_header (type, props) values ('api_scenario_list', diff --git a/backend/src/main/resources/db/migration/V80__v1.9.0_release.sql b/backend/src/main/resources/db/migration/V80__v1.9.0_release.sql index a6842fe953..488585b79a 100644 --- a/backend/src/main/resources/db/migration/V80__v1.9.0_release.sql +++ b/backend/src/main/resources/db/migration/V80__v1.9.0_release.sql @@ -14,9 +14,7 @@ CREATE TABLE IF NOT EXISTS `custom_field` ( `create_time` bigint(13) NOT NULL COMMENT 'Create timestamp', `update_time` bigint(13) NOT NULL COMMENT 'Update timestamp', PRIMARY KEY (`id`) -) - ENGINE = InnoDB - DEFAULT CHARSET = utf8mb4; +) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE utf8mb4_general_ci; -- 用例系统字段 INSERT INTO custom_field (id,name,scene,`type`,remark,`options`,`system`,`global`,workspace_id,create_time,update_time) @@ -58,9 +56,7 @@ CREATE TABLE IF NOT EXISTS `test_case_template` ( `create_time` bigint(13) NOT NULL COMMENT 'Create timestamp', `update_time` bigint(13) NOT NULL COMMENT 'Update timestamp', PRIMARY KEY (`id`) -) - ENGINE = InnoDB - DEFAULT CHARSET = utf8mb4; +) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE utf8mb4_general_ci; -- 系统模板 INSERT INTO test_case_template (id,name,`type`,description,case_name,prerequisite,step_description,expected_result,actual_result,`system`,`global`,workspace_id,create_time,update_time) @@ -80,9 +76,7 @@ CREATE TABLE IF NOT EXISTS `issue_template` ( `create_time` bigint(13) NOT NULL COMMENT 'Create timestamp', `update_time` bigint(13) NOT NULL COMMENT 'Update timestamp', PRIMARY KEY (`id`) -) - ENGINE = InnoDB - DEFAULT CHARSET = utf8mb4; +) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE utf8mb4_general_ci; -- 系统模板 INSERT INTO issue_template (id,`name`,platform,description,title,`global`,`system`,workspace_id,content,create_time,update_time) @@ -109,9 +103,7 @@ CREATE TABLE IF NOT EXISTS `custom_field_template` ( `default_value` varchar(30) DEFAULT NULL COMMENT 'Default value', `custom_data` varchar(255) DEFAULT NULL COMMENT 'Custom data', PRIMARY KEY (`id`) -) - ENGINE = InnoDB - DEFAULT CHARSET = utf8mb4; +) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE utf8mb4_general_ci; -- 系统用例模板关联系统字段 INSERT INTO custom_field_template (id,field_id,template_id,scene,required,default_value) @@ -172,8 +164,7 @@ CREATE TABLE IF NOT EXISTS `mock_config` primary key (id), INDEX `api_id` (`api_id`) USING BTREE, INDEX `project_id` (`project_id`) USING BTREE -) ENGINE = InnoDB - DEFAULT CHARSET = utf8mb4; +) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE utf8mb4_general_ci; CREATE TABLE IF NOT EXISTS `mock_expect_config` ( @@ -189,8 +180,7 @@ CREATE TABLE IF NOT EXISTS `mock_expect_config` create_user_id VARCHAR(64) null, primary key (id), INDEX `mock_config_id` (`mock_config_id`) USING BTREE -) ENGINE = InnoDB - DEFAULT CHARSET = utf8mb4; +) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE utf8mb4_general_ci; -- module management INSERT INTO system_parameter (param_key, param_value, type, sort) diff --git a/backend/src/main/resources/db/migration/V84__v1.10_release.sql b/backend/src/main/resources/db/migration/V84__v1.10_release.sql index 74df7a0688..a5610d5e52 100644 --- a/backend/src/main/resources/db/migration/V84__v1.10_release.sql +++ b/backend/src/main/resources/db/migration/V84__v1.10_release.sql @@ -23,8 +23,7 @@ CREATE TABLE `operating_log` `oper_params` longtext COMMENT 'operating params', `oper_time` bigint(13) NOT NULL COMMENT 'Update timestamp', PRIMARY KEY (`id`) -) ENGINE = InnoDB - DEFAULT CHARSET = utf8mb4; +) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE utf8mb4_general_ci; -- system_parameter UPDATE system_parameter