style: flyway 格式
This commit is contained in:
parent
17a4ababeb
commit
463fa89850
|
@ -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,7 +28,8 @@ 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`
|
||||||
(
|
(
|
||||||
|
@ -31,40 +37,29 @@ CREATE TABLE IF NOT EXISTS `api_scenario_report_result`
|
||||||
`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',
|
|
||||||
`report_id` VARCHAR
|
|
||||||
(
|
|
||||||
50
|
|
||||||
) DEFAULT NULL COMMENT '请求资源 id',
|
|
||||||
`create_time` bigint
|
|
||||||
(
|
|
||||||
13
|
|
||||||
) NULL COMMENT '创建时间',
|
|
||||||
`resource_tree` longblob DEFAULT NULL COMMENT '资源步骤结构树',
|
`resource_tree` longblob DEFAULT NULL COMMENT '资源步骤结构树',
|
||||||
`console` LONGTEXT DEFAULT NULL COMMENT '执行日志',
|
`console` LONGTEXT DEFAULT NULL COMMENT '执行日志',
|
||||||
PRIMARY KEY
|
PRIMARY KEY (`id`),
|
||||||
(
|
KEY `index_report_id` (`report_id`) USING BTREE
|
||||||
`id`
|
) ENGINE = InnoDB
|
||||||
),
|
DEFAULT CHARSET = utf8mb4
|
||||||
KEY `index_report_id`
|
COLLATE = utf8mb4_general_ci;
|
||||||
(
|
|
||||||
`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)
|
||||||
|
|
Loading…
Reference in New Issue