style: flyway 格式

This commit is contained in:
CaptainB 2021-12-21 13:12:59 +08:00 committed by 刘瑞斌
parent 17a4ababeb
commit 463fa89850
1 changed files with 32 additions and 37 deletions

View File

@ -9,9 +9,14 @@ ALTER TABLE project
ADD third_part_template tinyint(1) DEFAULT 0 NULL COMMENT '是否使用第三方平台缺陷模板'; ADD third_part_template tinyint(1) DEFAULT 0 NULL COMMENT '是否使用第三方平台缺陷模板';
-- 处理历史数据 -- 处理历史数据
UPDATE issue_template SET platform = 'Local' WHERE platform = 'metersphere'; UPDATE issue_template
UPDATE project p JOIN issue_template it on p.issue_template_id = it.id SET p.platform = it.platform; SET platform = 'Local'
UPDATE custom_field SET `type` = 'date' WHERE `type` = 'data'; WHERE platform = 'metersphere';
UPDATE project p JOIN issue_template it ON p.issue_template_id = it.id
SET p.platform = it.platform;
UPDATE custom_field
SET `type` = 'date'
WHERE `type` = 'data';
-- 公共用例库 -- 公共用例库
ALTER TABLE project ALTER TABLE project
@ -23,48 +28,38 @@ ALTER TABLE test_case
ADD case_public tinyint(1) DEFAULT NULL COMMENT '是否是公共用例'; ADD case_public tinyint(1) DEFAULT NULL COMMENT '是否是公共用例';
-- 执行结果优化 -- 执行结果优化
alter table api_scenario_report add report_version int null; ALTER TABLE api_scenario_report
ADD report_version int NULL;
CREATE TABLE IF NOT EXISTS `api_scenario_report_result` CREATE TABLE IF NOT EXISTS `api_scenario_report_result`
( (
`id` varchar(50) NOT NULL COMMENT 'ID', `id` varchar(50) NOT NULL COMMENT 'ID',
`resource_id` VARCHAR(200) DEFAULT NULL COMMENT '请求资源 id', `resource_id` VARCHAR(200) DEFAULT NULL COMMENT '请求资源 id',
`report_id` VARCHAR(50) DEFAULT NULL COMMENT '报告 id', `report_id` VARCHAR(50) DEFAULT NULL COMMENT '报告 id',
`create_time` bigint(13) NULL COMMENT '创建时间', `create_time` bigint(13) NULL COMMENT '创建时间',
`status` varchar(100) null COMMENT '结果状态', `status` varchar(100) NULL COMMENT '结果状态',
`request_time` bigint(13) null COMMENT '请求时间', `request_time` bigint(13) NULL COMMENT '请求时间',
`total_assertions` bigint(13) null COMMENT '总断言数', `total_assertions` bigint(13) NULL COMMENT '总断言数',
`pass_assertions` bigint(13) null COMMENT '失败断言数', `pass_assertions` bigint(13) NULL COMMENT '失败断言数',
`content` longblob COMMENT '执行结果', `content` longblob COMMENT '执行结果',
PRIMARY KEY (`id`), PRIMARY KEY (`id`),
KEY `index_resource_id` (`resource_id`) USING BTREE KEY `index_resource_id` (`resource_id`) USING BTREE
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_general_ci; ) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4
COLLATE = utf8mb4_general_ci;
CREATE TABLE IF NOT EXISTS `api_scenario_report_structure` CREATE TABLE IF NOT EXISTS `api_scenario_report_structure`
( (
`id` varchar `id` varchar(50) NOT NULL COMMENT 'ID',
( `report_id` VARCHAR(50) DEFAULT NULL COMMENT '请求资源 id',
50 `create_time` bigint(13) NULL COMMENT '创建时间',
) NOT NULL COMMENT 'ID', `resource_tree` longblob DEFAULT NULL COMMENT '资源步骤结构树',
`report_id` VARCHAR `console` LONGTEXT DEFAULT NULL COMMENT '执行日志',
( PRIMARY KEY (`id`),
50 KEY `index_report_id` (`report_id`) USING BTREE
) DEFAULT NULL COMMENT '请求资源 id', ) ENGINE = InnoDB
`create_time` bigint DEFAULT CHARSET = utf8mb4
( COLLATE = utf8mb4_general_ci;
13
) NULL COMMENT '创建时间',
`resource_tree` longblob DEFAULT NULL COMMENT '资源步骤结构树',
`console` LONGTEXT DEFAULT NULL COMMENT '执行日志',
PRIMARY KEY
(
`id`
),
KEY `index_report_id`
(
`report_id`
) USING BTREE
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_general_ci;
INSERT INTO user_group_permission (id, group_id, permission_id, module_id) INSERT INTO user_group_permission (id, group_id, permission_id, module_id)