build: flyway补充字符集信息

This commit is contained in:
jianxing 2023-08-25 14:53:13 +08:00 committed by 刘瑞斌
parent 32bdecb415
commit e1d62bf8c8
6 changed files with 157 additions and 55 deletions

View File

@ -14,7 +14,7 @@ CREATE TABLE IF NOT EXISTS case_review(
`create_user` VARCHAR(50) NOT NULL COMMENT '创建人' ,
`review_pass_rule` VARCHAR(64) NOT NULL DEFAULT 'Single' COMMENT '评审规则:单人通过/全部通过' ,
PRIMARY KEY (id)
) ENGINE = InnoDB
) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4
COLLATE = utf8mb4_general_ci COMMENT = '用例评审';

View File

@ -19,7 +19,9 @@ CREATE TABLE IF NOT EXISTS test_plan(
`actual_end_time` BIGINT COMMENT '实际结束时间' ,
`description` VARCHAR(2000) COMMENT '描述' ,
PRIMARY KEY (id)
) COMMENT = '测试计划';
) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4
COLLATE = utf8mb4_general_ci COMMENT = '测试计划';
CREATE INDEX idx_parent_id ON test_plan(project_id);
@ -30,13 +32,17 @@ CREATE TABLE IF NOT EXISTS test_plan_follower(
`test_plan_id` VARCHAR(50) NOT NULL COMMENT '测试计划ID;联合主键' ,
`user_id` VARCHAR(50) NOT NULL COMMENT '用户ID;联合主键' ,
PRIMARY KEY (test_plan_id,user_id)
) COMMENT = '测试计划关注人';
) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4
COLLATE = utf8mb4_general_ci COMMENT = '测试计划关注人';
CREATE TABLE IF NOT EXISTS test_plan_principal(
`test_plan_id` VARCHAR(50) NOT NULL COMMENT '测试计划ID' ,
`user_id` VARCHAR(50) NOT NULL COMMENT '用户ID' ,
PRIMARY KEY (test_plan_id,user_id)
) COMMENT = '测试计划责任人';
) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4
COLLATE = utf8mb4_general_ci COMMENT = '测试计划责任人';
CREATE TABLE IF NOT EXISTS test_plan_config(
`test_plan_id` VARCHAR(50) NOT NULL COMMENT '测试计划ID' ,
@ -45,7 +51,9 @@ CREATE TABLE IF NOT EXISTS test_plan_config(
`repeat_case` BIT(1) NOT NULL DEFAULT 0 COMMENT '是否允许重复添加用例' ,
`pass_threshold` INT NOT NULL DEFAULT 100 COMMENT '测试计划通过阈值;0-100' ,
PRIMARY KEY (test_plan_id)
) COMMENT = '测试计划配置';
) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4
COLLATE = utf8mb4_general_ci COMMENT = '测试计划配置';
CREATE TABLE IF NOT EXISTS test_plan_api_case(
`id` VARCHAR(50) NOT NULL COMMENT 'ID' ,
@ -58,7 +66,9 @@ CREATE TABLE IF NOT EXISTS test_plan_api_case(
`create_user` VARCHAR(40) NOT NULL COMMENT '创建人' ,
`pos` BIGINT NOT NULL COMMENT '自定义排序间隔5000' ,
PRIMARY KEY (id)
) COMMENT = '测试计划关联接口用例';
) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4
COLLATE = utf8mb4_general_ci COMMENT = '测试计划关联接口用例';
CREATE INDEX idx_api_case_id ON test_plan_api_case(api_case_id);
@ -76,7 +86,9 @@ CREATE TABLE IF NOT EXISTS test_plan_api_scenario(
`environment` LONGTEXT COMMENT '所属环境' ,
`environment_group_id` VARCHAR(50) COMMENT '环境组ID' ,
PRIMARY KEY (id)
) COMMENT = '测试计划关联场景用例';
) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4
COLLATE = utf8mb4_general_ci COMMENT = '测试计划关联场景用例';
CREATE INDEX idx_api_scenario_id ON test_plan_api_scenario(api_scenario_id);
@ -94,7 +106,9 @@ CREATE TABLE IF NOT EXISTS test_plan_load_case(
`load_configuration` LONGTEXT COMMENT '压力配置' ,
`advanced_configuration` TEXT COMMENT '高级配置' ,
PRIMARY KEY (id)
) COMMENT = '测试计划关联性能测试用例';
) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4
COLLATE = utf8mb4_general_ci COMMENT = '测试计划关联性能测试用例';
CREATE INDEX idx_load_case_id ON test_plan_load_case(load_case_id);
@ -109,7 +123,9 @@ CREATE TABLE IF NOT EXISTS test_plan_function_case(
`create_user` VARCHAR(50) NOT NULL COMMENT '创建人' ,
`pos` BIGINT NOT NULL COMMENT '自定义排序间隔5000' ,
PRIMARY KEY (id)
) COMMENT = '测试计划关联功能用例';
) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4
COLLATE = utf8mb4_general_ci COMMENT = '测试计划关联功能用例';
CREATE INDEX idx_function_case_id ON test_plan_function_case(function_case_id);
@ -127,7 +143,9 @@ CREATE TABLE IF NOT EXISTS test_plan_ui_scenario(
`environment` LONGTEXT COMMENT '所属环境' ,
`environment_group_id` VARCHAR(50) COMMENT '环境组ID' ,
PRIMARY KEY (id)
) COMMENT = '测试计划关联UI场景';
) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4
COLLATE = utf8mb4_general_ci COMMENT = '测试计划关联UI场景';
CREATE INDEX idx_ui_scenario_id ON test_plan_ui_scenario(ui_scenario_id);

View File

@ -17,7 +17,9 @@ CREATE TABLE IF NOT EXISTS custom_field
`project_id` VARCHAR(50) COMMENT '项目ID',
`third_part` BIT NOT NULL DEFAULT 0 COMMENT '是否关联第三方',
PRIMARY KEY (id)
) COMMENT = '自定义字段';
) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4
COLLATE = utf8mb4_general_ci COMMENT = '自定义字段';
CREATE INDEX idx_global ON custom_field (global);
@ -40,7 +42,9 @@ CREATE TABLE IF NOT EXISTS custom_field_template
`custom_data` VARCHAR(255) COMMENT '自定义数据',
`key` VARCHAR(1) COMMENT '自定义表头',
PRIMARY KEY (id)
) COMMENT = '自定义模版';
) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4
COLLATE = utf8mb4_general_ci COMMENT = '自定义模版';
CREATE INDEX custom_field_template_field_id_index ON custom_field_template (field_id);
@ -53,7 +57,9 @@ CREATE TABLE IF NOT EXISTS custom_function
`tags` VARCHAR(1000) COMMENT '标签',
`description` VARCHAR(500) COMMENT '函数描述',
PRIMARY KEY (id)
) COMMENT = '自定义函数-代码片段';
) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4
COLLATE = utf8mb4_general_ci COMMENT = '自定义函数-代码片段';
CREATE INDEX name ON custom_function (name);
@ -70,7 +76,9 @@ CREATE TABLE IF NOT EXISTS fake_error
`match_type` VARCHAR(255) NOT NULL COMMENT '匹配类型',
`status` BIT COMMENT '状态',
PRIMARY KEY (id)
) COMMENT = '误报库';
) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4
COLLATE = utf8mb4_general_ci COMMENT = '误报库';
CREATE INDEX idx_project_id ON fake_error (project_id);
@ -90,7 +98,9 @@ CREATE TABLE IF NOT EXISTS file_association
`file_type` VARCHAR(50) NOT NULL COMMENT '文件类型',
`project_id` VARCHAR(50) NOT NULL COMMENT '项目id',
PRIMARY KEY (id)
) COMMENT = '文件关联资源关系(分散到模块)';
) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4
COLLATE = utf8mb4_general_ci COMMENT = '文件关联资源关系(分散到模块)';
CREATE INDEX idx_file_metadata_id ON file_association (file_metadata_id);
@ -118,7 +128,9 @@ CREATE TABLE IF NOT EXISTS file_metadata
`latest` BIT NOT NULL DEFAULT 1 COMMENT '是否是最新版',
`ref_id` VARCHAR(50) NOT NULL COMMENT '同版本数据关联的ID',
PRIMARY KEY (id)
) COMMENT = '文件基础信息';
) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4
COLLATE = utf8mb4_general_ci COMMENT = '文件基础信息';
CREATE INDEX idx_file_name ON file_metadata (name);
@ -141,7 +153,9 @@ CREATE TABLE IF NOT EXISTS file_module
`create_user` VARCHAR(50) COMMENT '创建人',
`module_type` VARCHAR(20) DEFAULT 'module' COMMENT '模块类型: module/repository',
PRIMARY KEY (id)
) COMMENT = '文件管理模块';
) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4
COLLATE = utf8mb4_general_ci COMMENT = '文件管理模块';
CREATE INDEX idx_project_id ON file_module (project_id);
@ -169,7 +183,9 @@ CREATE TABLE IF NOT EXISTS project
`module_setting` VARCHAR(255) COMMENT '模块设置' ,
PRIMARY KEY (id),
CONSTRAINT idx_num UNIQUE (num)
) COMMENT = '项目';
) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4
COLLATE = utf8mb4_general_ci COMMENT = '项目';
CREATE INDEX idx_organization_id ON project (organization_id);
@ -186,7 +202,9 @@ CREATE TABLE IF NOT EXISTS project_application
`type` VARCHAR(50) NOT NULL COMMENT '配置项',
`type_value` VARCHAR(255) COMMENT '配置值',
PRIMARY KEY (project_id, type)
) COMMENT = '项目应用';
) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4
COLLATE = utf8mb4_general_ci COMMENT = '项目应用';
CREATE INDEX idx_project_application_type ON project_application (type);
@ -205,7 +223,9 @@ CREATE TABLE IF NOT EXISTS project_version
`create_time` BIGINT NOT NULL COMMENT '创建时间',
`create_user` VARCHAR(50) NOT NULL COMMENT '创建人',
PRIMARY KEY (id)
) COMMENT = '版本管理';
) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4
COLLATE = utf8mb4_general_ci COMMENT = '版本管理';
CREATE INDEX idx_project_id ON project_version (project_id);
@ -222,7 +242,9 @@ CREATE TABLE IF NOT EXISTS file_module_blob
`repository_user_name` VARCHAR(255) COMMENT '存储库Token',
`repository_token` VARCHAR(255) COMMENT '存储库Token',
PRIMARY KEY (id)
) COMMENT = '文件管理模块大字段';
) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4
COLLATE = utf8mb4_general_ci COMMENT = '文件管理模块大字段';
CREATE TABLE IF NOT EXISTS custom_function_blob
(
@ -231,7 +253,9 @@ CREATE TABLE IF NOT EXISTS custom_function_blob
`script` LONGBLOB COMMENT '函数体',
`result` LONGBLOB COMMENT '执行结果',
PRIMARY KEY (id)
) COMMENT = '自定义函数-代码片段大字段';
) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4
COLLATE = utf8mb4_general_ci COMMENT = '自定义函数-代码片段大字段';
CREATE TABLE IF NOT EXISTS fake_error_blob
(
@ -239,14 +263,18 @@ CREATE TABLE IF NOT EXISTS fake_error_blob
`content` LONGBLOB COMMENT '内容',
`description` LONGBLOB COMMENT '报告内容',
PRIMARY KEY (id)
) COMMENT = '误报库大字段';
) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4
COLLATE = utf8mb4_general_ci COMMENT = '误报库大字段';
CREATE TABLE IF NOT EXISTS file_metadata_blob
(
`id` VARCHAR(50) NOT NULL COMMENT '文件ID',
`git_info` LONGBLOB COMMENT '储存库',
PRIMARY KEY (id)
) COMMENT = '文件基础信息大字段';
) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4
COLLATE = utf8mb4_general_ci COMMENT = '文件基础信息大字段';
CREATE TABLE IF NOT EXISTS functional_case_template
(
@ -258,7 +286,9 @@ CREATE TABLE IF NOT EXISTS functional_case_template
`create_user` VARCHAR(50) NOT NULL COMMENT '创建人',
`project_id` VARCHAR(50) NOT NULL COMMENT '项目ID',
PRIMARY KEY (id)
) COMMENT = '功能用例模版';
) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4
COLLATE = utf8mb4_general_ci COMMENT = '功能用例模版';
CREATE INDEX idx_name ON functional_case_template (name);
@ -278,7 +308,9 @@ CREATE TABLE IF NOT EXISTS functional_case_template_extend
`step_model` VARCHAR(64) NOT NULL DEFAULT 'Step' COMMENT '编辑模式模板:步骤模式/文本模式',
`steps` TEXT COMMENT '用例步骤',
PRIMARY KEY (id)
) COMMENT = '功能用例模版扩展';
) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4
COLLATE = utf8mb4_general_ci COMMENT = '功能用例模版扩展';
CREATE TABLE IF NOT EXISTS bug_template_extend
(
@ -286,7 +318,9 @@ CREATE TABLE IF NOT EXISTS bug_template_extend
`title` VARCHAR(255) COMMENT '缺陷标题模板',
`content` TEXT COMMENT '缺陷内容模板',
PRIMARY KEY (id)
) COMMENT = '缺陷模板扩展';
) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4
COLLATE = utf8mb4_general_ci COMMENT = '缺陷模板扩展';
CREATE TABLE IF NOT EXISTS bug_template
(
@ -298,7 +332,9 @@ CREATE TABLE IF NOT EXISTS bug_template
`create_user` VARCHAR(50) NOT NULL COMMENT '创建人',
`project_id` VARCHAR(50) NOT NULL COMMENT '项目ID',
PRIMARY KEY (id)
) COMMENT = '缺陷模版';
) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4
COLLATE = utf8mb4_general_ci COMMENT = '缺陷模版';
CREATE INDEX idx_name ON bug_template (name);
@ -317,7 +353,9 @@ CREATE TABLE IF NOT EXISTS api_template
`create_user` VARCHAR(50) NOT NULL COMMENT '创建人',
`project_id` VARCHAR(50) NOT NULL COMMENT '项目ID',
PRIMARY KEY (id)
) COMMENT = '接口定义模板';
) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4
COLLATE = utf8mb4_general_ci COMMENT = '接口定义模板';
CREATE INDEX idx_name ON api_template (name);
@ -339,7 +377,7 @@ CREATE TABLE IF NOT EXISTS message_task
`create_time` BIGINT NOT NULL DEFAULT 0 COMMENT '创建时间',
`project_id` VARCHAR(50) NOT NULL COMMENT '项目ID',
PRIMARY KEY (id)
) ENGINE = InnoDB
) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4
COLLATE = utf8mb4_general_ci COMMENT = '消息通知任务';
@ -354,7 +392,7 @@ CREATE TABLE IF NOT EXISTS message_task_blob
`id` VARCHAR(50) NOT NULL COMMENT '',
`template` TEXT COMMENT '消息模版',
PRIMARY KEY (id)
) ENGINE = InnoDB
) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4
COLLATE = utf8mb4_general_ci COMMENT = '消息通知任务大字段';
@ -373,7 +411,7 @@ CREATE TABLE IF NOT EXISTS notification
`resource_type` VARCHAR(50) NOT NULL COMMENT '资源类型',
`resource_name` VARCHAR(255) NOT NULL COMMENT '资源名称',
PRIMARY KEY (id)
) ENGINE = InnoDB
) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4
COLLATE = utf8mb4_general_ci COMMENT = '消息通知';
@ -399,7 +437,9 @@ CREATE TABLE IF NOT EXISTS project_robot(
`update_time` BIGINT NOT NULL COMMENT '更新时间' ,
`description` VARCHAR(255) COMMENT '描述' ,
PRIMARY KEY (id)
) COMMENT = '项目机器人';
) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4
COLLATE = utf8mb4_general_ci COMMENT = '项目机器人';
CREATE INDEX idx_project_id ON project_robot(project_id);

View File

@ -29,7 +29,9 @@ CREATE TABLE IF NOT EXISTS api_definition(
`ref_id` VARCHAR(50) COMMENT '版本引用fk' ,
`description` VARCHAR(500) COMMENT '描述' ,
PRIMARY KEY (id)
) COMMENT = '接口定义';
) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4
COLLATE = utf8mb4_general_ci COMMENT = '接口定义';
CREATE INDEX idx_project_id ON api_definition(project_id);
@ -51,7 +53,9 @@ CREATE TABLE IF NOT EXISTS api_definition_blob(
`response` LONGBLOB COMMENT '响应内容' ,
`remark` BLOB COMMENT '备注' ,
PRIMARY KEY (id)
) COMMENT = '接口定义详情内容';
) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4
COLLATE = utf8mb4_general_ci COMMENT = '接口定义详情内容';

View File

@ -14,7 +14,9 @@ CREATE TABLE IF NOT EXISTS bug(
`platform_status` VARCHAR(50) NOT NULL DEFAULT '' COMMENT '第三方平台状态' ,
`platform_id` VARCHAR(50) COMMENT '第三方平台缺陷ID' ,
PRIMARY KEY (id)
) COMMENT = '缺陷';
) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4
COLLATE = utf8mb4_general_ci COMMENT = '缺陷';
-- set innodb lock wait timeout to default

View File

@ -19,7 +19,9 @@ CREATE TABLE IF NOT EXISTS ui_element(
`create_time` BIGINT NOT NULL COMMENT '创建时间' ,
`update_time` BIGINT NOT NULL COMMENT '更新时间' ,
PRIMARY KEY (id)
) COMMENT = '元素';
) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4
COLLATE = utf8mb4_general_ci COMMENT = '元素';
CREATE INDEX idx_pos ON ui_element(pos);
@ -44,7 +46,9 @@ CREATE TABLE IF NOT EXISTS ui_element_module(
`pos` DOUBLE NOT NULL COMMENT '自定义排序' ,
`create_user` VARCHAR(50) NOT NULL COMMENT '创建人' ,
PRIMARY KEY (id)
) COMMENT = '元素模块';
) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4
COLLATE = utf8mb4_general_ci COMMENT = '元素模块';
CREATE INDEX idx_project_id ON ui_element_module(project_id);
@ -60,7 +64,9 @@ CREATE TABLE IF NOT EXISTS ui_element_scenario_reference(
`scenario_id` VARCHAR(50) NOT NULL COMMENT '场景ID' ,
`project_id` VARCHAR(50) NOT NULL COMMENT '项目ID' ,
PRIMARY KEY (id)
) COMMENT = '元素场景关系表';
) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4
COLLATE = utf8mb4_general_ci COMMENT = '元素场景关系表';
CREATE INDEX idx_element_id ON ui_element_scenario_reference(element_id);
@ -94,7 +100,9 @@ CREATE TABLE IF NOT EXISTS ui_scenario(
`latest` BIT NOT NULL DEFAULT 0 COMMENT '是否为最新版本 0:否1:是' ,
`description` VARCHAR(500) COMMENT '描述' ,
PRIMARY KEY (id)
) COMMENT = '场景';
) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4
COLLATE = utf8mb4_general_ci COMMENT = '场景';
CREATE INDEX idx_ref_id ON ui_scenario(ref_id);
@ -118,7 +126,9 @@ CREATE TABLE IF NOT EXISTS ui_scenario_reference(
`reference_id` VARCHAR(50) NOT NULL COMMENT '被引用的ID' ,
`data_type` VARCHAR(20) NOT NULL COMMENT '引用的数据类型(场景,指令)' ,
PRIMARY KEY (id)
) COMMENT = '场景引用关系';
) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4
COLLATE = utf8mb4_general_ci COMMENT = '场景引用关系';
CREATE INDEX idx_ui_scenario_id ON ui_scenario_reference(ui_scenario_id);
@ -143,7 +153,9 @@ CREATE TABLE IF NOT EXISTS ui_scenario_report(
`relevance_test_plan_report_id` VARCHAR(50) COMMENT '关联的测试计划报告ID可以为空)' ,
`report_source` VARCHAR(64) NOT NULL COMMENT '报告生成来源(生成报告,后端调试,本地调试)' ,
PRIMARY KEY (id)
) COMMENT = '场景报告';
) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4
COLLATE = utf8mb4_general_ci COMMENT = '场景报告';
CREATE INDEX idx_project_id ON ui_scenario_report(project_id);
@ -168,7 +180,9 @@ CREATE TABLE IF NOT EXISTS ui_scenario_report_detail(
`content` LONGBLOB NOT NULL COMMENT '执行结果' ,
`base_info` LONGBLOB COMMENT '记录截图断言等结果' ,
PRIMARY KEY (id)
) COMMENT = '报告结果';
) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4
COLLATE = utf8mb4_general_ci COMMENT = '报告结果';
CREATE INDEX idx_resource_id ON ui_scenario_report_detail(resource_id);
@ -182,7 +196,9 @@ CREATE TABLE IF NOT EXISTS ui_scenario_report_structure(
`create_time` BIGINT NOT NULL COMMENT '创建时间' ,
`resource_tree` LONGBLOB NOT NULL COMMENT '资源步骤结构树' ,
PRIMARY KEY (id)
) COMMENT = '报告结构';
) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4
COLLATE = utf8mb4_general_ci COMMENT = '报告结构';
CREATE INDEX idx_report_id ON ui_scenario_report_structure(report_id);
@ -212,7 +228,9 @@ CREATE TABLE IF NOT EXISTS ui_custom_command(
`latest` BIT NOT NULL DEFAULT 0 COMMENT '是否为最新版本 0:否1:是' ,
`description` VARCHAR(500) COMMENT '描述' ,
PRIMARY KEY (id)
) COMMENT = '自定义指令';
) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4
COLLATE = utf8mb4_general_ci COMMENT = '自定义指令';
CREATE INDEX idx_ref_id ON ui_custom_command(ref_id);
@ -240,7 +258,9 @@ CREATE TABLE IF NOT EXISTS ui_scenario_module(
`pos` DOUBLE NOT NULL COMMENT '自定义排序' ,
`create_user` VARCHAR(50) NOT NULL COMMENT '创建人' ,
PRIMARY KEY (id)
) COMMENT = '场景模块';
) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4
COLLATE = utf8mb4_general_ci COMMENT = '场景模块';
CREATE INDEX idx_project_id ON ui_scenario_module(project_id);
@ -260,7 +280,9 @@ CREATE TABLE IF NOT EXISTS ui_custom_command_module(
`pos` DOUBLE NOT NULL COMMENT '自定义排序' ,
`create_user` VARCHAR(50) NOT NULL COMMENT '创建人' ,
PRIMARY KEY (id)
) COMMENT = '自定义指令模块';
) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4
COLLATE = utf8mb4_general_ci COMMENT = '自定义指令模块';
CREATE INDEX idx_project_id ON ui_custom_command_module(project_id);
@ -274,7 +296,9 @@ CREATE TABLE IF NOT EXISTS ui_scenario_blob(
`scenario_definition` LONGBLOB COMMENT '场景定义' ,
`environment_json` BLOB COMMENT '环境' ,
PRIMARY KEY (id)
) COMMENT = '场景大字段';
) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4
COLLATE = utf8mb4_general_ci COMMENT = '场景大字段';
CREATE INDEX idx_scenario_id ON ui_scenario_blob(id);
@ -284,7 +308,9 @@ CREATE TABLE IF NOT EXISTS ui_scenario_report_environment(
`project_id` VARCHAR(50) COMMENT '项目ID' ,
`environment_id` VARCHAR(50) COMMENT '环境ID' ,
PRIMARY KEY (report_id)
) COMMENT = '场景报告和环境关系';
) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4
COLLATE = utf8mb4_general_ci COMMENT = '场景报告和环境关系';
CREATE INDEX idx_report_id ON ui_scenario_report_environment(report_id);
@ -294,7 +320,9 @@ CREATE TABLE IF NOT EXISTS ui_custom_command_blob(
`scenario_definition` LONGBLOB COMMENT '场景定义' ,
`command_view_struct` LONGBLOB COMMENT '自定义结构' ,
PRIMARY KEY (id)
) COMMENT = '自定义指令大字段';
) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4
COLLATE = utf8mb4_general_ci COMMENT = '自定义指令大字段';
CREATE INDEX idx_command_id ON ui_custom_command_blob(id);
@ -305,7 +333,9 @@ CREATE TABLE IF NOT EXISTS ui_scenario_report_log(
`create_time` BIGINT NOT NULL COMMENT '创建时间' ,
`console` LONGBLOB NOT NULL COMMENT '执行日志' ,
PRIMARY KEY (id)
) COMMENT = '报告日志';
) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4
COLLATE = utf8mb4_general_ci COMMENT = '报告日志';
CREATE INDEX idx_report_id ON ui_scenario_report_log(report_id);
@ -317,7 +347,9 @@ CREATE TABLE IF NOT EXISTS ui_element_command_reference(
`command_id` VARCHAR(50) NOT NULL COMMENT '指令ID' ,
`project_id` VARCHAR(50) NOT NULL COMMENT '项目ID' ,
PRIMARY KEY (id)
) COMMENT = '元素指令关系表';
) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4
COLLATE = utf8mb4_general_ci COMMENT = '元素指令关系表';
CREATE INDEX idx_element_id ON ui_element_command_reference(element_id);
@ -329,7 +361,9 @@ CREATE TABLE IF NOT EXISTS ui_scenario_follower(
`scenario_id` VARCHAR(50) NOT NULL COMMENT '场景ID' ,
`user_id` VARCHAR(50) NOT NULL COMMENT '关注人ID' ,
PRIMARY KEY (scenario_id,user_id)
) COMMENT = '场景用例关注表';
) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4
COLLATE = utf8mb4_general_ci COMMENT = '场景用例关注表';
CREATE INDEX idx_user_id ON ui_scenario_follower(user_id);
@ -343,7 +377,9 @@ CREATE TABLE ui_scenario_variable(
`name` VARCHAR(255) NOT NULL COMMENT '变量名称' ,
`description` VARCHAR(500) COMMENT '描述' ,
PRIMARY KEY (resource_id)
) COMMENT = '场景变量';
) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4
COLLATE = utf8mb4_general_ci COMMENT = '场景变量';
CREATE INDEX idx_resource_id ON ui_scenario_variable(resource_id);
@ -361,7 +397,9 @@ CREATE TABLE ui_custom_variable(
`out_put` BIT NOT NULL DEFAULT 0 COMMENT '是否是出参' ,
`enable` BIT NOT NULL DEFAULT 1 COMMENT '启用禁用' ,
PRIMARY KEY (resource_id)
) COMMENT = '指令初入参变量';
) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4
COLLATE = utf8mb4_general_ci COMMENT = '指令初入参变量';
CREATE INDEX idx_resource_id ON ui_custom_variable(resource_id);