ci: flyway 修改

This commit is contained in:
CaptainB 2023-06-14 11:10:24 +08:00
parent ec284cac6f
commit 32618993a5
13 changed files with 91 additions and 161 deletions

View File

@ -1,8 +1,7 @@
-- set innodb lock wait timeout -- set innodb lock wait timeout
SET SESSION innodb_lock_wait_timeout = 7200; SET SESSION innodb_lock_wait_timeout = 7200;
DROP TABLE IF EXISTS auth_source; CREATE TABLE IF NOT EXISTS auth_source
CREATE TABLE auth_source
( (
`id` VARCHAR(50) NOT NULL COMMENT '认证源ID', `id` VARCHAR(50) NOT NULL COMMENT '认证源ID',
`configuration` BLOB NOT NULL COMMENT '认证源配置', `configuration` BLOB NOT NULL COMMENT '认证源配置',
@ -22,8 +21,7 @@ CREATE INDEX idx_name ON auth_source (`name`);
CREATE INDEX idx_create_time ON auth_source (`create_time`); CREATE INDEX idx_create_time ON auth_source (`create_time`);
CREATE INDEX idx_update_time ON auth_source (`update_time`); CREATE INDEX idx_update_time ON auth_source (`update_time`);
DROP TABLE IF EXISTS user_role; CREATE TABLE IF NOT EXISTS user_role
CREATE TABLE user_role
( (
`id` VARCHAR(50) NOT NULL COMMENT '组ID', `id` VARCHAR(50) NOT NULL COMMENT '组ID',
`name` VARCHAR(255) NOT NULL COMMENT '组名称', `name` VARCHAR(255) NOT NULL COMMENT '组名称',
@ -47,8 +45,7 @@ CREATE INDEX idx_create_user ON user_role (`create_user`);
CREATE INDEX idx_scope_id ON user_role (`scope_id`); CREATE INDEX idx_scope_id ON user_role (`scope_id`);
CREATE INDEX idx_update_time ON user_role (`update_time`); CREATE INDEX idx_update_time ON user_role (`update_time`);
DROP TABLE IF EXISTS license; CREATE TABLE IF NOT EXISTS license
CREATE TABLE license
( (
`id` VARCHAR(50) NOT NULL COMMENT 'ID', `id` VARCHAR(50) NOT NULL COMMENT 'ID',
`create_time` BIGINT NOT NULL COMMENT 'Create timestamp', `create_time` BIGINT NOT NULL COMMENT 'Create timestamp',
@ -59,8 +56,7 @@ CREATE TABLE license
DEFAULT CHARSET = utf8mb4 DEFAULT CHARSET = utf8mb4
COLLATE = utf8mb4_general_ci COMMENT = ''; COLLATE = utf8mb4_general_ci COMMENT = '';
DROP TABLE IF EXISTS message_task; CREATE TABLE IF NOT EXISTS message_task
CREATE TABLE message_task
( (
`id` VARCHAR(50) NOT NULL COMMENT '', `id` VARCHAR(50) NOT NULL COMMENT '',
`type` VARCHAR(50) NOT NULL COMMENT '消息类型', `type` VARCHAR(50) NOT NULL COMMENT '消息类型',
@ -82,8 +78,7 @@ CREATE INDEX idx_create_time ON message_task (`create_time`);
CREATE INDEX idx_receiver ON message_task (`receiver`); CREATE INDEX idx_receiver ON message_task (`receiver`);
CREATE INDEX idx_test_id ON message_task (`test_id`); CREATE INDEX idx_test_id ON message_task (`test_id`);
DROP TABLE IF EXISTS notification; CREATE TABLE IF NOT EXISTS notification
CREATE TABLE notification
( (
`id` BIGINT NOT NULL AUTO_INCREMENT COMMENT 'ID', `id` BIGINT NOT NULL AUTO_INCREMENT COMMENT 'ID',
`type` VARCHAR(30) NOT NULL COMMENT '通知类型', `type` VARCHAR(30) NOT NULL COMMENT '通知类型',
@ -106,8 +101,7 @@ CREATE INDEX idx_receiver ON notification (`receiver`);
CREATE INDEX idx_receiver_type ON notification (`receiver`, `type`); CREATE INDEX idx_receiver_type ON notification (`receiver`, `type`);
CREATE INDEX idx_notification_create_time ON notification (`create_time`); CREATE INDEX idx_notification_create_time ON notification (`create_time`);
DROP TABLE IF EXISTS novice_statistics; CREATE TABLE IF NOT EXISTS novice_statistics
CREATE TABLE novice_statistics
( (
`id` VARCHAR(50) NOT NULL COMMENT '', `id` VARCHAR(50) NOT NULL COMMENT '',
`user_id` VARCHAR(50) COMMENT '用户id', `user_id` VARCHAR(50) COMMENT '用户id',
@ -121,8 +115,7 @@ CREATE TABLE novice_statistics
DEFAULT CHARSET = utf8mb4 DEFAULT CHARSET = utf8mb4
COLLATE = utf8mb4_general_ci COMMENT = '新手村'; COLLATE = utf8mb4_general_ci COMMENT = '新手村';
DROP TABLE IF EXISTS operation_log; CREATE TABLE IF NOT EXISTS operation_log
CREATE TABLE operation_log
( (
`id` VARCHAR(50) NOT NULL COMMENT '主键', `id` VARCHAR(50) NOT NULL COMMENT '主键',
`project_id` VARCHAR(50) NOT NULL DEFAULT 'NONE' COMMENT '项目id', `project_id` VARCHAR(50) NOT NULL DEFAULT 'NONE' COMMENT '项目id',
@ -146,8 +139,7 @@ CREATE INDEX idx_module ON operation_log(`module`);
CREATE INDEX idx_project_id ON operation_log(`project_id`); CREATE INDEX idx_project_id ON operation_log(`project_id`);
CREATE INDEX idx_type ON operation_log(`type`); CREATE INDEX idx_type ON operation_log(`type`);
DROP TABLE IF EXISTS plugin; CREATE TABLE IF NOT EXISTS plugin
CREATE TABLE plugin
( (
`id` VARCHAR(50) NOT NULL COMMENT 'ID', `id` VARCHAR(50) NOT NULL COMMENT 'ID',
`name` VARCHAR(255) COMMENT 'plugin name', `name` VARCHAR(255) COMMENT 'plugin name',
@ -168,8 +160,7 @@ CREATE TABLE plugin
DEFAULT CHARSET = utf8mb4 DEFAULT CHARSET = utf8mb4
COLLATE = utf8mb4_general_ci COMMENT = '插件'; COLLATE = utf8mb4_general_ci COMMENT = '插件';
DROP TABLE IF EXISTS quota; CREATE TABLE IF NOT EXISTS quota
CREATE TABLE quota
( (
`id` VARCHAR(50) NOT NULL COMMENT '', `id` VARCHAR(50) NOT NULL COMMENT '',
`organization_id` VARCHAR(50) COMMENT '组织ID', `organization_id` VARCHAR(50) COMMENT '组织ID',
@ -198,8 +189,7 @@ CREATE TABLE quota
CREATE INDEX idx_quota_project_id ON quota (`project_id`); CREATE INDEX idx_quota_project_id ON quota (`project_id`);
CREATE INDEX idx_quota_workspace_id ON quota (`organization_id`); CREATE INDEX idx_quota_workspace_id ON quota (`organization_id`);
DROP TABLE IF EXISTS schedule; CREATE TABLE IF NOT EXISTS schedule
CREATE TABLE schedule
( (
`id` VARCHAR(50) NOT NULL COMMENT '', `id` VARCHAR(50) NOT NULL COMMENT '',
`key` VARCHAR(50) COMMENT 'qrtz UUID', `key` VARCHAR(50) COMMENT 'qrtz UUID',
@ -229,8 +219,7 @@ CREATE INDEX idx_enable ON schedule (`enable`);
CREATE INDEX idx_name ON schedule (`name`); CREATE INDEX idx_name ON schedule (`name`);
CREATE INDEX idx_type ON schedule (`type`); CREATE INDEX idx_type ON schedule (`type`);
DROP TABLE IF EXISTS service_integration; CREATE TABLE IF NOT EXISTS service_integration
CREATE TABLE service_integration
( (
`id` VARCHAR(50) NOT NULL COMMENT '', `id` VARCHAR(50) NOT NULL COMMENT '',
`platform` VARCHAR(50) NOT NULL COMMENT '平台', `platform` VARCHAR(50) NOT NULL COMMENT '平台',
@ -244,8 +233,7 @@ CREATE TABLE service_integration
CREATE INDEX idx_workspace_id ON service_integration (`organization_id`); CREATE INDEX idx_workspace_id ON service_integration (`organization_id`);
DROP TABLE IF EXISTS system_parameter; CREATE TABLE IF NOT EXISTS system_parameter
CREATE TABLE system_parameter
( (
`param_key` VARCHAR(64) NOT NULL COMMENT '参数名称', `param_key` VARCHAR(64) NOT NULL COMMENT '参数名称',
`param_value` VARCHAR(255) COMMENT '参数值', `param_value` VARCHAR(255) COMMENT '参数值',
@ -255,8 +243,7 @@ CREATE TABLE system_parameter
DEFAULT CHARSET = utf8mb4 DEFAULT CHARSET = utf8mb4
COLLATE = utf8mb4_general_ci COMMENT = '系统参数'; COLLATE = utf8mb4_general_ci COMMENT = '系统参数';
DROP TABLE IF EXISTS test_resource; CREATE TABLE IF NOT EXISTS test_resource(
CREATE TABLE test_resource(
`id` VARCHAR(50) NOT NULL COMMENT '资源节点ID' , `id` VARCHAR(50) NOT NULL COMMENT '资源节点ID' ,
`test_resource_pool_id` VARCHAR(50) NOT NULL COMMENT '资源池ID' , `test_resource_pool_id` VARCHAR(50) NOT NULL COMMENT '资源池ID' ,
`configuration` BLOB COMMENT '资源节点配置' , `configuration` BLOB COMMENT '资源节点配置' ,
@ -276,8 +263,7 @@ CREATE INDEX idx_create_time ON test_resource(`create_time`);
CREATE INDEX idx_enable ON test_resource(`enable`); CREATE INDEX idx_enable ON test_resource(`enable`);
CREATE INDEX idx_update_time ON test_resource(`update_time`); CREATE INDEX idx_update_time ON test_resource(`update_time`);
DROP TABLE IF EXISTS test_resource_pool; CREATE TABLE IF NOT EXISTS test_resource_pool(
CREATE TABLE test_resource_pool(
`id` VARCHAR(50) NOT NULL COMMENT '资源池ID' , `id` VARCHAR(50) NOT NULL COMMENT '资源池ID' ,
`name` VARCHAR(255) NOT NULL COMMENT '名称' , `name` VARCHAR(255) NOT NULL COMMENT '名称' ,
`type` VARCHAR(30) NOT NULL COMMENT '类型' , `type` VARCHAR(30) NOT NULL COMMENT '类型' ,
@ -308,8 +294,7 @@ CREATE INDEX idx_create_time ON test_resource_pool(`create_time`);
CREATE INDEX idx_update_time ON test_resource_pool(`update_time`); CREATE INDEX idx_update_time ON test_resource_pool(`update_time`);
CREATE INDEX idx_create_user ON test_resource_pool(`create_user`); CREATE INDEX idx_create_user ON test_resource_pool(`create_user`);
DROP TABLE IF EXISTS user; CREATE TABLE IF NOT EXISTS user
CREATE TABLE user
( (
`id` VARCHAR(50) NOT NULL COMMENT '用户ID', `id` VARCHAR(50) NOT NULL COMMENT '用户ID',
`name` VARCHAR(255) NOT NULL COMMENT '用户名', `name` VARCHAR(255) NOT NULL COMMENT '用户名',
@ -340,8 +325,7 @@ CREATE INDEX idx_project_id ON user (`last_project_id`);
CREATE INDEX idx_create_user ON user (`create_user`); CREATE INDEX idx_create_user ON user (`create_user`);
CREATE INDEX idx_update_user ON user (`update_user`); CREATE INDEX idx_update_user ON user (`update_user`);
DROP TABLE IF EXISTS user_role_relation; CREATE TABLE IF NOT EXISTS user_role_relation(
CREATE TABLE user_role_relation(
`id` VARCHAR(50) NOT NULL COMMENT '用户组关系ID' , `id` VARCHAR(50) NOT NULL COMMENT '用户组关系ID' ,
`user_id` VARCHAR(50) NOT NULL COMMENT '用户ID' , `user_id` VARCHAR(50) NOT NULL COMMENT '用户ID' ,
`role_id` VARCHAR(50) NOT NULL COMMENT '组ID' , `role_id` VARCHAR(50) NOT NULL COMMENT '组ID' ,
@ -360,8 +344,7 @@ CREATE INDEX idx_group_id ON user_role_relation(`role_id`);
CREATE INDEX idx_source_id ON user_role_relation(`source_id`); CREATE INDEX idx_source_id ON user_role_relation(`source_id`);
CREATE INDEX idx_create_time ON user_role_relation(`create_time`); CREATE INDEX idx_create_time ON user_role_relation(`create_time`);
DROP TABLE IF EXISTS user_role_permission; CREATE TABLE IF NOT EXISTS user_role_permission
CREATE TABLE user_role_permission
( (
`id` VARCHAR(64) NOT NULL COMMENT '', `id` VARCHAR(64) NOT NULL COMMENT '',
`role_id` VARCHAR(64) NOT NULL COMMENT '用户组ID', `role_id` VARCHAR(64) NOT NULL COMMENT '用户组ID',
@ -376,8 +359,7 @@ CREATE TABLE user_role_permission
CREATE INDEX idx_group_id ON user_role_permission (`role_id`); CREATE INDEX idx_group_id ON user_role_permission (`role_id`);
CREATE INDEX idx_permission_id ON user_role_permission (`permission_id`); CREATE INDEX idx_permission_id ON user_role_permission (`permission_id`);
DROP TABLE IF EXISTS user_key; CREATE TABLE IF NOT EXISTS user_key
CREATE TABLE user_key
( (
`id` VARCHAR(50) NOT NULL COMMENT 'user_key ID', `id` VARCHAR(50) NOT NULL COMMENT 'user_key ID',
`create_user` VARCHAR(50) NOT NULL COMMENT '用户ID', `create_user` VARCHAR(50) NOT NULL COMMENT '用户ID',
@ -394,8 +376,7 @@ CREATE TABLE user_key
CREATE UNIQUE INDEX idx_ak ON user_key (`access_key`); CREATE UNIQUE INDEX idx_ak ON user_key (`access_key`);
CREATE INDEX idx_create_user ON user_key (`create_user`); CREATE INDEX idx_create_user ON user_key (`create_user`);
DROP TABLE IF EXISTS organization; CREATE TABLE IF NOT EXISTS organization
CREATE TABLE organization
( (
`id` VARCHAR(50) NOT NULL COMMENT '组织ID', `id` VARCHAR(50) NOT NULL COMMENT '组织ID',
`num` BIGINT NOT NULL AUTO_INCREMENT COMMENT '组织编号', `num` BIGINT NOT NULL AUTO_INCREMENT COMMENT '组织编号',
@ -423,8 +404,7 @@ CREATE INDEX idx_update_time ON organization (`update_time`);
CREATE INDEX idx_deleted ON organization (`deleted`); CREATE INDEX idx_deleted ON organization (`deleted`);
CREATE INDEX idx_update_user ON organization(`update_user`); CREATE INDEX idx_update_user ON organization(`update_user`);
DROP TABLE IF EXISTS user_extend; CREATE TABLE IF NOT EXISTS user_extend
CREATE TABLE user_extend
( (
`id` VARCHAR(50) NOT NULL COMMENT '用户ID', `id` VARCHAR(50) NOT NULL COMMENT '用户ID',
`platform_info` BLOB COMMENT '其他平台对接信息', `platform_info` BLOB COMMENT '其他平台对接信息',
@ -434,8 +414,7 @@ CREATE TABLE user_extend
DEFAULT CHARSET = utf8mb4 DEFAULT CHARSET = utf8mb4
COLLATE = utf8mb4_general_ci COMMENT = '用户扩展'; COLLATE = utf8mb4_general_ci COMMENT = '用户扩展';
DROP TABLE IF EXISTS message_task_blob; CREATE TABLE IF NOT EXISTS message_task_blob
CREATE TABLE message_task_blob
( (
`id` VARCHAR(50) NOT NULL COMMENT '', `id` VARCHAR(50) NOT NULL COMMENT '',
`template` TEXT COMMENT '消息模版', `template` TEXT COMMENT '消息模版',
@ -444,8 +423,7 @@ CREATE TABLE message_task_blob
DEFAULT CHARSET = utf8mb4 DEFAULT CHARSET = utf8mb4
COLLATE = utf8mb4_general_ci COMMENT = '消息通知任务大字段'; COLLATE = utf8mb4_general_ci COMMENT = '消息通知任务大字段';
DROP TABLE IF EXISTS plugin_blob; CREATE TABLE IF NOT EXISTS plugin_blob
CREATE TABLE plugin_blob
( (
`id` VARCHAR(50) NOT NULL COMMENT 'ID', `id` VARCHAR(50) NOT NULL COMMENT 'ID',
`form_option` LONGBLOB COMMENT 'plugin form option', `form_option` LONGBLOB COMMENT 'plugin form option',

View File

@ -23,7 +23,6 @@ CREATE TABLE IF NOT EXISTS test_plan(
CREATE INDEX idx_parent_id ON test_plan(project_id); CREATE INDEX idx_parent_id ON test_plan(project_id);
CREATE INDEX idx_project_id ON test_plan(project_id);
CREATE INDEX idx_create_user ON test_plan(create_user); CREATE INDEX idx_create_user ON test_plan(create_user);
CREATE INDEX idx_status ON test_plan(status); CREATE INDEX idx_status ON test_plan(status);
@ -44,12 +43,11 @@ CREATE TABLE IF NOT EXISTS test_plan_config(
`run_mode_config` TEXT COMMENT '运行模式' , `run_mode_config` TEXT COMMENT '运行模式' ,
`automatic_status_update` BIT(1) NOT NULL DEFAULT 0 COMMENT '是否自定更新功能用例状态' , `automatic_status_update` BIT(1) NOT NULL DEFAULT 0 COMMENT '是否自定更新功能用例状态' ,
`repeat_case` BIT(1) NOT NULL DEFAULT 0 COMMENT '是否允许重复添加用例' , `repeat_case` BIT(1) NOT NULL DEFAULT 0 COMMENT '是否允许重复添加用例' ,
`pass_threshold` INT(3) NOT NULL DEFAULT 100 COMMENT '测试计划通过阈值;0-100' , `pass_threshold` INT NOT NULL DEFAULT 100 COMMENT '测试计划通过阈值;0-100' ,
PRIMARY KEY (test_plan_id) PRIMARY KEY (test_plan_id)
) COMMENT = '测试计划配置'; ) COMMENT = '测试计划配置';
DROP TABLE IF EXISTS test_plan_api_case; CREATE TABLE IF NOT EXISTS test_plan_api_case(
CREATE TABLE test_plan_api_case(
`id` VARCHAR(50) NOT NULL COMMENT 'ID' , `id` VARCHAR(50) NOT NULL COMMENT 'ID' ,
`test_plan_id` VARCHAR(50) NOT NULL COMMENT '测试计划ID' , `test_plan_id` VARCHAR(50) NOT NULL COMMENT '测试计划ID' ,
`api_case_id` VARCHAR(50) NOT NULL COMMENT '接口用例ID' , `api_case_id` VARCHAR(50) NOT NULL COMMENT '接口用例ID' ,
@ -67,8 +65,7 @@ CREATE INDEX idx_api_case_id ON test_plan_api_case(api_case_id);
CREATE INDEX idx_test_plan_id ON test_plan_api_case(test_plan_id); CREATE INDEX idx_test_plan_id ON test_plan_api_case(test_plan_id);
CREATE INDEX idx_create_user ON test_plan_api_case(create_user); CREATE INDEX idx_create_user ON test_plan_api_case(create_user);
DROP TABLE IF EXISTS test_plan_api_scenario; CREATE TABLE IF NOT EXISTS test_plan_api_scenario(
CREATE TABLE test_plan_api_scenario(
`id` VARCHAR(50) NOT NULL COMMENT 'ID' , `id` VARCHAR(50) NOT NULL COMMENT 'ID' ,
`test_plan_id` VARCHAR(50) NOT NULL COMMENT '测试计划ID' , `test_plan_id` VARCHAR(50) NOT NULL COMMENT '测试计划ID' ,
`api_scenario_id` VARCHAR(255) COMMENT '场景ID' , `api_scenario_id` VARCHAR(255) COMMENT '场景ID' ,
@ -86,8 +83,7 @@ CREATE INDEX idx_api_scenario_id ON test_plan_api_scenario(api_scenario_id);
CREATE INDEX idx_test_plan_id ON test_plan_api_scenario(test_plan_id); CREATE INDEX idx_test_plan_id ON test_plan_api_scenario(test_plan_id);
CREATE INDEX idx_create_user ON test_plan_api_scenario(create_user); CREATE INDEX idx_create_user ON test_plan_api_scenario(create_user);
DROP TABLE IF EXISTS test_plan_load_case; CREATE TABLE IF NOT EXISTS test_plan_load_case(
CREATE TABLE test_plan_load_case(
`id` VARCHAR(50) NOT NULL COMMENT 'ID' , `id` VARCHAR(50) NOT NULL COMMENT 'ID' ,
`test_plan_id` VARCHAR(50) NOT NULL COMMENT '测试计划ID' , `test_plan_id` VARCHAR(50) NOT NULL COMMENT '测试计划ID' ,
`load_case_id` VARCHAR(50) NOT NULL COMMENT '性能用例ID' , `load_case_id` VARCHAR(50) NOT NULL COMMENT '性能用例ID' ,
@ -105,8 +101,7 @@ CREATE INDEX idx_load_case_id ON test_plan_load_case(load_case_id);
CREATE INDEX idx_test_plan_id ON test_plan_load_case(test_plan_id); CREATE INDEX idx_test_plan_id ON test_plan_load_case(test_plan_id);
CREATE INDEX idx_create_user ON test_plan_load_case(create_user); CREATE INDEX idx_create_user ON test_plan_load_case(create_user);
DROP TABLE IF EXISTS test_plan_function_case; CREATE TABLE IF NOT EXISTS test_plan_function_case(
CREATE TABLE test_plan_function_case(
`id` VARCHAR(50) NOT NULL COMMENT 'ID' , `id` VARCHAR(50) NOT NULL COMMENT 'ID' ,
`test_plan_id` VARCHAR(50) NOT NULL COMMENT '测试计划ID' , `test_plan_id` VARCHAR(50) NOT NULL COMMENT '测试计划ID' ,
`function_case_id` VARCHAR(50) NOT NULL COMMENT '功能用例ID' , `function_case_id` VARCHAR(50) NOT NULL COMMENT '功能用例ID' ,
@ -121,8 +116,7 @@ CREATE INDEX idx_function_case_id ON test_plan_function_case(function_case_id);
CREATE INDEX idx_test_plan_id ON test_plan_function_case(test_plan_id); CREATE INDEX idx_test_plan_id ON test_plan_function_case(test_plan_id);
CREATE INDEX idx_create_user ON test_plan_function_case(create_user); CREATE INDEX idx_create_user ON test_plan_function_case(create_user);
DROP TABLE IF EXISTS test_plan_ui_scenario; CREATE TABLE IF NOT EXISTS test_plan_ui_scenario(
CREATE TABLE test_plan_ui_scenario(
`id` VARCHAR(50) NOT NULL COMMENT 'ID' , `id` VARCHAR(50) NOT NULL COMMENT 'ID' ,
`test_plan_id` VARCHAR(50) NOT NULL COMMENT '测试计划ID' , `test_plan_id` VARCHAR(50) NOT NULL COMMENT '测试计划ID' ,
`ui_scenario_id` VARCHAR(50) NOT NULL COMMENT 'UI场景ID' , `ui_scenario_id` VARCHAR(50) NOT NULL COMMENT 'UI场景ID' ,

View File

@ -1,8 +1,7 @@
-- set innodb lock wait timeout -- set innodb lock wait timeout
SET SESSION innodb_lock_wait_timeout = 7200; SET SESSION innodb_lock_wait_timeout = 7200;
DROP TABLE IF EXISTS custom_field; CREATE TABLE IF NOT EXISTS custom_field
CREATE TABLE custom_field
( (
`id` VARCHAR(50) NOT NULL COMMENT '自定义字段ID', `id` VARCHAR(50) NOT NULL COMMENT '自定义字段ID',
`name` VARCHAR(255) NOT NULL COMMENT '自定义字段名称', `name` VARCHAR(255) NOT NULL COMMENT '自定义字段名称',
@ -29,8 +28,7 @@ CREATE INDEX idx_update_time ON custom_field (update_time);
CREATE INDEX idx_create_user ON custom_field (create_user); CREATE INDEX idx_create_user ON custom_field (create_user);
CREATE INDEX idx_project_id ON custom_field (project_id); CREATE INDEX idx_project_id ON custom_field (project_id);
DROP TABLE IF EXISTS custom_field_template; CREATE TABLE IF NOT EXISTS custom_field_template
CREATE TABLE custom_field_template
( (
`id` VARCHAR(50) NOT NULL COMMENT '自定义模版ID', `id` VARCHAR(50) NOT NULL COMMENT '自定义模版ID',
`field_id` VARCHAR(50) NOT NULL COMMENT '自定义字段ID', `field_id` VARCHAR(50) NOT NULL COMMENT '自定义字段ID',
@ -48,8 +46,7 @@ CREATE TABLE custom_field_template
CREATE INDEX custom_field_template_field_id_index ON custom_field_template (field_id); CREATE INDEX custom_field_template_field_id_index ON custom_field_template (field_id);
CREATE INDEX custom_field_template_template_id_index ON custom_field_template (template_id); CREATE INDEX custom_field_template_template_id_index ON custom_field_template (template_id);
DROP TABLE IF EXISTS custom_function; CREATE TABLE IF NOT EXISTS custom_function
CREATE TABLE custom_function
( (
`id` VARCHAR(50) NOT NULL COMMENT '', `id` VARCHAR(50) NOT NULL COMMENT '',
`name` VARCHAR(255) NOT NULL COMMENT '函数名', `name` VARCHAR(255) NOT NULL COMMENT '函数名',
@ -61,8 +58,7 @@ CREATE TABLE custom_function
CREATE INDEX name ON custom_function (name); CREATE INDEX name ON custom_function (name);
DROP TABLE IF EXISTS fake_error; CREATE TABLE IF NOT EXISTS fake_error
CREATE TABLE fake_error
( (
`id` VARCHAR(50) NOT NULL COMMENT '误报ID', `id` VARCHAR(50) NOT NULL COMMENT '误报ID',
`project_id` VARCHAR(50) NOT NULL COMMENT '项目ID', `project_id` VARCHAR(50) NOT NULL COMMENT '项目ID',
@ -84,8 +80,7 @@ CREATE INDEX idx_update_time ON fake_error (update_time);
CREATE INDEX idx_create_user ON fake_error (create_user); CREATE INDEX idx_create_user ON fake_error (create_user);
CREATE INDEX idx_update_user ON fake_error (update_user); CREATE INDEX idx_update_user ON fake_error (update_user);
DROP TABLE IF EXISTS file_association; CREATE TABLE IF NOT EXISTS file_association
CREATE TABLE file_association
( (
`id` VARCHAR(50) NOT NULL COMMENT '', `id` VARCHAR(50) NOT NULL COMMENT '',
`type` VARCHAR(50) NOT NULL COMMENT '模块类型,服务拆分后就是各个服务', `type` VARCHAR(50) NOT NULL COMMENT '模块类型,服务拆分后就是各个服务',
@ -102,8 +97,7 @@ CREATE INDEX idx_file_metadata_id ON file_association (file_metadata_id);
CREATE INDEX idx_project_id ON file_association (project_id); CREATE INDEX idx_project_id ON file_association (project_id);
CREATE INDEX idx_source_id ON file_association (source_id); CREATE INDEX idx_source_id ON file_association (source_id);
DROP TABLE IF EXISTS file_metadata; CREATE TABLE IF NOT EXISTS file_metadata
CREATE TABLE file_metadata
( (
`id` VARCHAR(50) NOT NULL COMMENT '文件ID', `id` VARCHAR(50) NOT NULL COMMENT '文件ID',
`name` VARCHAR(255) NOT NULL COMMENT '文件名', `name` VARCHAR(255) NOT NULL COMMENT '文件名',
@ -134,8 +128,7 @@ CREATE INDEX idx_storage ON file_metadata (storage);
CREATE INDEX idx_module_id ON file_metadata (module_id); CREATE INDEX idx_module_id ON file_metadata (module_id);
CREATE INDEX idx_project_id ON file_metadata (project_id); CREATE INDEX idx_project_id ON file_metadata (project_id);
DROP TABLE IF EXISTS file_module; CREATE TABLE IF NOT EXISTS file_module
CREATE TABLE file_module
( (
`id` VARCHAR(50) NOT NULL COMMENT 'ID', `id` VARCHAR(50) NOT NULL COMMENT 'ID',
`project_id` VARCHAR(50) NOT NULL COMMENT '项目ID', `project_id` VARCHAR(50) NOT NULL COMMENT '项目ID',
@ -158,8 +151,7 @@ CREATE INDEX idx_update_timed ON file_module (update_time);
CREATE INDEX idx_pos ON file_module (pos); CREATE INDEX idx_pos ON file_module (pos);
CREATE INDEX idx_create_user ON file_module (create_user); CREATE INDEX idx_create_user ON file_module (create_user);
DROP TABLE IF EXISTS project; CREATE TABLE IF NOT EXISTS project
CREATE TABLE project
( (
`id` VARCHAR(50) NOT NULL COMMENT '项目ID', `id` VARCHAR(50) NOT NULL COMMENT '项目ID',
`num` BIGINT NOT NULL AUTO_INCREMENT COMMENT '项目编号', `num` BIGINT NOT NULL AUTO_INCREMENT COMMENT '项目编号',
@ -170,7 +162,7 @@ CREATE TABLE project
`update_time` BIGINT NOT NULL COMMENT '更新时间', `update_time` BIGINT NOT NULL COMMENT '更新时间',
`update_user` VARCHAR(50) NOT NULL COMMENT '修改人', `update_user` VARCHAR(50) NOT NULL COMMENT '修改人',
`create_user` VARCHAR(50) COMMENT '创建人', `create_user` VARCHAR(50) COMMENT '创建人',
`delete_time` BIGINT(255) COMMENT '删除时间', `delete_time` BIGINT COMMENT '删除时间',
`deleted` BIT NOT NULL DEFAULT 0 COMMENT '是否删除', `deleted` BIT NOT NULL DEFAULT 0 COMMENT '是否删除',
`delete_user` VARCHAR(50) COMMENT '删除人', `delete_user` VARCHAR(50) COMMENT '删除人',
`enable` BIT COMMENT '是否启用', `enable` BIT COMMENT '是否启用',
@ -187,8 +179,7 @@ CREATE INDEX idx_name ON project (name);
CREATE INDEX idx_deleted ON project (deleted); CREATE INDEX idx_deleted ON project (deleted);
CREATE INDEX idx_update_user ON project(update_user); CREATE INDEX idx_update_user ON project(update_user);
DROP TABLE IF EXISTS project_application; CREATE TABLE IF NOT EXISTS project_application
CREATE TABLE project_application
( (
`project_id` VARCHAR(50) NOT NULL COMMENT '项目ID', `project_id` VARCHAR(50) NOT NULL COMMENT '项目ID',
`type` VARCHAR(50) NOT NULL COMMENT '配置项', `type` VARCHAR(50) NOT NULL COMMENT '配置项',
@ -199,8 +190,7 @@ CREATE TABLE project_application
CREATE INDEX idx_project_application_type ON project_application (type); CREATE INDEX idx_project_application_type ON project_application (type);
DROP TABLE IF EXISTS project_version; CREATE TABLE IF NOT EXISTS project_version
CREATE TABLE project_version
( (
`id` VARCHAR(50) NOT NULL COMMENT '版本ID', `id` VARCHAR(50) NOT NULL COMMENT '版本ID',
`project_id` VARCHAR(50) NOT NULL COMMENT '项目ID', `project_id` VARCHAR(50) NOT NULL COMMENT '项目ID',
@ -223,8 +213,7 @@ CREATE INDEX idx_create_time ON project_version (create_time);
CREATE INDEX idx_create_user ON project_version (create_user); CREATE INDEX idx_create_user ON project_version (create_user);
CREATE INDEX idx_latest ON project_version (latest); CREATE INDEX idx_latest ON project_version (latest);
DROP TABLE IF EXISTS file_module_blob; CREATE TABLE IF NOT EXISTS file_module_blob
CREATE TABLE file_module_blob
( (
`id` VARCHAR(50) NOT NULL COMMENT 'ID', `id` VARCHAR(50) NOT NULL COMMENT 'ID',
`repository_desc` LONGBLOB COMMENT '存储库描述', `repository_desc` LONGBLOB COMMENT '存储库描述',
@ -234,8 +223,7 @@ CREATE TABLE file_module_blob
PRIMARY KEY (id) PRIMARY KEY (id)
) COMMENT = '文件管理模块大字段'; ) COMMENT = '文件管理模块大字段';
DROP TABLE IF EXISTS custom_function_blob; CREATE TABLE IF NOT EXISTS custom_function_blob
CREATE TABLE custom_function_blob
( (
`id` VARCHAR(50) NOT NULL COMMENT '', `id` VARCHAR(50) NOT NULL COMMENT '',
`params` LONGBLOB COMMENT '参数列表', `params` LONGBLOB COMMENT '参数列表',
@ -244,8 +232,7 @@ CREATE TABLE custom_function_blob
PRIMARY KEY (id) PRIMARY KEY (id)
) COMMENT = '自定义函数-代码片段大字段'; ) COMMENT = '自定义函数-代码片段大字段';
DROP TABLE IF EXISTS fake_error_blob; CREATE TABLE IF NOT EXISTS fake_error_blob
CREATE TABLE fake_error_blob
( (
`id` VARCHAR(50) NOT NULL COMMENT 'Test ID', `id` VARCHAR(50) NOT NULL COMMENT 'Test ID',
`content` LONGBLOB COMMENT '内容', `content` LONGBLOB COMMENT '内容',
@ -253,16 +240,14 @@ CREATE TABLE fake_error_blob
PRIMARY KEY (id) PRIMARY KEY (id)
) COMMENT = '误报库大字段'; ) COMMENT = '误报库大字段';
DROP TABLE IF EXISTS file_metadata_blob; CREATE TABLE IF NOT EXISTS file_metadata_blob
CREATE TABLE file_metadata_blob
( (
`id` VARCHAR(50) NOT NULL COMMENT '文件ID', `id` VARCHAR(50) NOT NULL COMMENT '文件ID',
`git_info` LONGBLOB COMMENT '储存库', `git_info` LONGBLOB COMMENT '储存库',
PRIMARY KEY (id) PRIMARY KEY (id)
) COMMENT = '文件基础信息大字段'; ) COMMENT = '文件基础信息大字段';
DROP TABLE IF EXISTS project_extend; CREATE TABLE IF NOT EXISTS project_extend
CREATE TABLE project_extend
( (
`id` VARCHAR(50) NOT NULL COMMENT '项目ID', `id` VARCHAR(50) NOT NULL COMMENT '项目ID',
`tapd_id` VARCHAR(50) COMMENT '', `tapd_id` VARCHAR(50) COMMENT '',
@ -282,8 +267,7 @@ CREATE TABLE project_extend
CREATE INDEX idx_project_id ON project_extend (id); CREATE INDEX idx_project_id ON project_extend (id);
DROP TABLE IF EXISTS functional_case_template; CREATE TABLE IF NOT EXISTS functional_case_template
CREATE TABLE functional_case_template
( (
`id` VARCHAR(50) NOT NULL COMMENT 'ID', `id` VARCHAR(50) NOT NULL COMMENT 'ID',
`name` VARCHAR(255) NOT NULL COMMENT '名称', `name` VARCHAR(255) NOT NULL COMMENT '名称',
@ -302,8 +286,7 @@ CREATE INDEX idx_create_time ON functional_case_template (create_time);
CREATE INDEX idx_create_user ON functional_case_template (create_user); CREATE INDEX idx_create_user ON functional_case_template (create_user);
CREATE INDEX idx_project_id ON functional_case_template (project_id); CREATE INDEX idx_project_id ON functional_case_template (project_id);
DROP TABLE IF EXISTS functional_case_template_extend; CREATE TABLE IF NOT EXISTS functional_case_template_extend
CREATE TABLE functional_case_template_extend
( (
`id` VARCHAR(50) NOT NULL COMMENT '模板ID', `id` VARCHAR(50) NOT NULL COMMENT '模板ID',
`case_name` VARCHAR(255) COMMENT '用例名称模板', `case_name` VARCHAR(255) COMMENT '用例名称模板',
@ -316,8 +299,7 @@ CREATE TABLE functional_case_template_extend
PRIMARY KEY (id) PRIMARY KEY (id)
) COMMENT = '功能用例模版扩展'; ) COMMENT = '功能用例模版扩展';
DROP TABLE IF EXISTS bug_template_extend; CREATE TABLE IF NOT EXISTS bug_template_extend
CREATE TABLE bug_template_extend
( (
`id` VARCHAR(50) NOT NULL COMMENT '缺陷模板ID', `id` VARCHAR(50) NOT NULL COMMENT '缺陷模板ID',
`title` VARCHAR(255) COMMENT '缺陷标题模板', `title` VARCHAR(255) COMMENT '缺陷标题模板',
@ -325,8 +307,7 @@ CREATE TABLE bug_template_extend
PRIMARY KEY (id) PRIMARY KEY (id)
) COMMENT = '缺陷模板扩展'; ) COMMENT = '缺陷模板扩展';
DROP TABLE IF EXISTS bug_template; CREATE TABLE IF NOT EXISTS bug_template
CREATE TABLE bug_template
( (
`id` VARCHAR(50) NOT NULL COMMENT 'ID', `id` VARCHAR(50) NOT NULL COMMENT 'ID',
`name` VARCHAR(255) NOT NULL COMMENT '名称', `name` VARCHAR(255) NOT NULL COMMENT '名称',
@ -345,8 +326,7 @@ CREATE INDEX idx_create_time ON bug_template (create_time);
CREATE INDEX idx_create_user ON bug_template (create_user); CREATE INDEX idx_create_user ON bug_template (create_user);
CREATE INDEX idx_project_id ON bug_template (project_id); CREATE INDEX idx_project_id ON bug_template (project_id);
DROP TABLE IF EXISTS api_template; CREATE TABLE IF NOT EXISTS api_template
CREATE TABLE api_template
( (
`id` VARCHAR(50) NOT NULL COMMENT 'ID', `id` VARCHAR(50) NOT NULL COMMENT 'ID',
`name` VARCHAR(255) NOT NULL COMMENT '名称', `name` VARCHAR(255) NOT NULL COMMENT '名称',

View File

@ -29,15 +29,15 @@ CREATE TABLE `QRTZ_TRIGGERS`
`JOB_NAME` VARCHAR(200) NOT NULL, `JOB_NAME` VARCHAR(200) NOT NULL,
`JOB_GROUP` VARCHAR(200) NOT NULL, `JOB_GROUP` VARCHAR(200) NOT NULL,
`DESCRIPTION` VARCHAR(250) DEFAULT NULL, `DESCRIPTION` VARCHAR(250) DEFAULT NULL,
`NEXT_FIRE_TIME` BIGINT(13) DEFAULT NULL, `NEXT_FIRE_TIME` BIGINT DEFAULT NULL,
`PREV_FIRE_TIME` BIGINT(13) DEFAULT NULL, `PREV_FIRE_TIME` BIGINT DEFAULT NULL,
`PRIORITY` INT(11) DEFAULT NULL, `PRIORITY` INT DEFAULT NULL,
`TRIGGER_STATE` VARCHAR(16) NOT NULL, `TRIGGER_STATE` VARCHAR(16) NOT NULL,
`TRIGGER_TYPE` VARCHAR(8) NOT NULL, `TRIGGER_TYPE` VARCHAR(8) NOT NULL,
`START_TIME` BIGINT(13) NOT NULL, `START_TIME` BIGINT NOT NULL,
`END_TIME` BIGINT(13) DEFAULT NULL, `END_TIME` BIGINT DEFAULT NULL,
`CALENDAR_NAME` VARCHAR(200) DEFAULT NULL, `CALENDAR_NAME` VARCHAR(200) DEFAULT NULL,
`MISFIRE_INSTR` SMALLINT(2) DEFAULT NULL, `MISFIRE_INSTR` SMALLINT DEFAULT NULL,
`JOB_DATA` BLOB, `JOB_DATA` BLOB,
PRIMARY KEY (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`), PRIMARY KEY (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`),
KEY `IDX_QRTZ_T_J` (`SCHED_NAME`, `JOB_NAME`, `JOB_GROUP`), KEY `IDX_QRTZ_T_J` (`SCHED_NAME`, `JOB_NAME`, `JOB_GROUP`),
@ -101,9 +101,9 @@ CREATE TABLE `QRTZ_FIRED_TRIGGERS`
`TRIGGER_NAME` VARCHAR(200) NOT NULL, `TRIGGER_NAME` VARCHAR(200) NOT NULL,
`TRIGGER_GROUP` VARCHAR(200) NOT NULL, `TRIGGER_GROUP` VARCHAR(200) NOT NULL,
`INSTANCE_NAME` VARCHAR(200) NOT NULL, `INSTANCE_NAME` VARCHAR(200) NOT NULL,
`FIRED_TIME` BIGINT(13) NOT NULL, `FIRED_TIME` BIGINT NOT NULL,
`SCHED_TIME` BIGINT(13) NOT NULL, `SCHED_TIME` BIGINT NOT NULL,
`PRIORITY` INT(11) NOT NULL, `PRIORITY` INT NOT NULL,
`STATE` VARCHAR(16) NOT NULL, `STATE` VARCHAR(16) NOT NULL,
`JOB_NAME` VARCHAR(200) DEFAULT NULL, `JOB_NAME` VARCHAR(200) DEFAULT NULL,
`JOB_GROUP` VARCHAR(200) DEFAULT NULL, `JOB_GROUP` VARCHAR(200) DEFAULT NULL,
@ -142,8 +142,8 @@ CREATE TABLE `QRTZ_SCHEDULER_STATE`
( (
`SCHED_NAME` VARCHAR(120) NOT NULL, `SCHED_NAME` VARCHAR(120) NOT NULL,
`INSTANCE_NAME` VARCHAR(200) NOT NULL, `INSTANCE_NAME` VARCHAR(200) NOT NULL,
`LAST_CHECKIN_TIME` BIGINT(13) NOT NULL, `LAST_CHECKIN_TIME` BIGINT NOT NULL,
`CHECKIN_INTERVAL` BIGINT(13) NOT NULL, `CHECKIN_INTERVAL` BIGINT NOT NULL,
PRIMARY KEY (`SCHED_NAME`, `INSTANCE_NAME`) PRIMARY KEY (`SCHED_NAME`, `INSTANCE_NAME`)
) ENGINE = InnoDB ) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4 DEFAULT CHARSET = utf8mb4
@ -154,9 +154,9 @@ CREATE TABLE `QRTZ_SIMPLE_TRIGGERS`
`SCHED_NAME` VARCHAR(120) NOT NULL, `SCHED_NAME` VARCHAR(120) NOT NULL,
`TRIGGER_NAME` VARCHAR(200) NOT NULL, `TRIGGER_NAME` VARCHAR(200) NOT NULL,
`TRIGGER_GROUP` VARCHAR(200) NOT NULL, `TRIGGER_GROUP` VARCHAR(200) NOT NULL,
`REPEAT_COUNT` BIGINT(7) NOT NULL, `REPEAT_COUNT` BIGINT NOT NULL,
`REPEAT_INTERVAL` BIGINT(12) NOT NULL, `REPEAT_INTERVAL` BIGINT NOT NULL,
`TIMES_TRIGGERED` BIGINT(10) NOT NULL, `TIMES_TRIGGERED` BIGINT NOT NULL,
PRIMARY KEY (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`), 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`) 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 ) ENGINE = InnoDB
@ -171,10 +171,10 @@ CREATE TABLE `QRTZ_SIMPROP_TRIGGERS`
`STR_PROP_1` VARCHAR(512) DEFAULT NULL, `STR_PROP_1` VARCHAR(512) DEFAULT NULL,
`STR_PROP_2` VARCHAR(512) DEFAULT NULL, `STR_PROP_2` VARCHAR(512) DEFAULT NULL,
`STR_PROP_3` VARCHAR(512) DEFAULT NULL, `STR_PROP_3` VARCHAR(512) DEFAULT NULL,
`INT_PROP_1` INT(11) DEFAULT NULL, `INT_PROP_1` INT DEFAULT NULL,
`INT_PROP_2` INT(11) DEFAULT NULL, `INT_PROP_2` INT DEFAULT NULL,
`LONG_PROP_1` BIGINT(20) DEFAULT NULL, `LONG_PROP_1` BIGINT DEFAULT NULL,
`LONG_PROP_2` BIGINT(20) DEFAULT NULL, `LONG_PROP_2` BIGINT DEFAULT NULL,
`DEC_PROP_1` DECIMAL(13, 4) DEFAULT NULL, `DEC_PROP_1` DECIMAL(13, 4) DEFAULT NULL,
`DEC_PROP_2` DECIMAL(13, 4) DEFAULT NULL, `DEC_PROP_2` DECIMAL(13, 4) DEFAULT NULL,
`BOOL_PROP_1` VARCHAR(1) DEFAULT NULL, `BOOL_PROP_1` VARCHAR(1) DEFAULT NULL,

View File

@ -1,7 +1,6 @@
-- set innodb lock wait timeout -- set innodb lock wait timeout
SET SESSION innodb_lock_wait_timeout = 7200; SET SESSION innodb_lock_wait_timeout = 7200;
DROP TABLE IF EXISTS bug;
CREATE TABLE IF NOT EXISTS bug( CREATE TABLE IF NOT EXISTS bug(
`id` VARCHAR(50) NOT NULL COMMENT 'ID' , `id` VARCHAR(50) NOT NULL COMMENT 'ID' ,
`num` INT NOT NULL COMMENT '业务ID' , `num` INT NOT NULL COMMENT '业务ID' ,

View File

@ -1,8 +1,7 @@
-- set innodb lock wait timeout -- set innodb lock wait timeout
SET SESSION innodb_lock_wait_timeout = 7200; SET SESSION innodb_lock_wait_timeout = 7200;
DROP TABLE IF EXISTS ui_element; CREATE TABLE IF NOT EXISTS ui_element(
CREATE TABLE ui_element(
`id` VARCHAR(50) NOT NULL COMMENT '元素id' , `id` VARCHAR(50) NOT NULL COMMENT '元素id' ,
`num` INT NOT NULL COMMENT '元素num' , `num` INT NOT NULL COMMENT '元素num' ,
`module_id` VARCHAR(50) NOT NULL COMMENT '元素所属模块id' , `module_id` VARCHAR(50) NOT NULL COMMENT '元素所属模块id' ,
@ -34,8 +33,7 @@ CREATE INDEX idx_update_time ON ui_element(update_time);
CREATE INDEX idx_create_user ON ui_element(create_user); CREATE INDEX idx_create_user ON ui_element(create_user);
CREATE INDEX idx_update_user ON ui_element(update_user); CREATE INDEX idx_update_user ON ui_element(update_user);
DROP TABLE IF EXISTS ui_element_module; CREATE TABLE IF NOT EXISTS ui_element_module(
CREATE TABLE ui_element_module(
`id` VARCHAR(50) NOT NULL COMMENT '模块ID' , `id` VARCHAR(50) NOT NULL COMMENT '模块ID' ,
`project_id` VARCHAR(50) NOT NULL COMMENT '项目ID' , `project_id` VARCHAR(50) NOT NULL COMMENT '项目ID' ,
`name` VARCHAR(255) NOT NULL COMMENT '模块名称' , `name` VARCHAR(255) NOT NULL COMMENT '模块名称' ,
@ -55,8 +53,7 @@ CREATE INDEX idx_create_time ON ui_element_module(create_time);
CREATE INDEX idx_update_time ON ui_element_module(update_time); CREATE INDEX idx_update_time ON ui_element_module(update_time);
CREATE INDEX idx_create_user ON ui_element_module(create_user); CREATE INDEX idx_create_user ON ui_element_module(create_user);
DROP TABLE IF EXISTS ui_element_scenario_reference; CREATE TABLE IF NOT EXISTS ui_element_scenario_reference(
CREATE TABLE ui_element_scenario_reference(
`id` VARCHAR(50) NOT NULL COMMENT 'ID' , `id` VARCHAR(50) NOT NULL COMMENT 'ID' ,
`element_id` VARCHAR(50) NOT NULL COMMENT '元素ID' , `element_id` VARCHAR(50) NOT NULL COMMENT '元素ID' ,
`element_module_id` VARCHAR(50) NOT NULL COMMENT '元素模块ID' , `element_module_id` VARCHAR(50) NOT NULL COMMENT '元素模块ID' ,
@ -71,8 +68,7 @@ CREATE INDEX idx_scenario_id ON ui_element_scenario_reference(scenario_id);
CREATE INDEX idx_project_id ON ui_element_scenario_reference(project_id); CREATE INDEX idx_project_id ON ui_element_scenario_reference(project_id);
CREATE INDEX idx_element_module_id ON ui_element_scenario_reference(element_module_id); CREATE INDEX idx_element_module_id ON ui_element_scenario_reference(element_module_id);
DROP TABLE IF EXISTS ui_scenario; CREATE TABLE IF NOT EXISTS ui_scenario(
CREATE TABLE ui_scenario(
`id` VARCHAR(50) NOT NULL COMMENT '场景ID' , `id` VARCHAR(50) NOT NULL COMMENT '场景ID' ,
`project_id` VARCHAR(50) NOT NULL COMMENT '项目ID' , `project_id` VARCHAR(50) NOT NULL COMMENT '项目ID' ,
`tags` VARCHAR(1000) COMMENT '标签' , `tags` VARCHAR(1000) COMMENT '标签' ,
@ -114,8 +110,7 @@ CREATE INDEX idx_num ON ui_scenario(num);
CREATE INDEX idx_deleted ON ui_scenario(deleted); CREATE INDEX idx_deleted ON ui_scenario(deleted);
CREATE INDEX idx_create_user ON ui_scenario(create_user); CREATE INDEX idx_create_user ON ui_scenario(create_user);
DROP TABLE IF EXISTS ui_scenario_reference; CREATE TABLE IF NOT EXISTS ui_scenario_reference(
CREATE TABLE ui_scenario_reference(
`id` VARCHAR(50) NOT NULL COMMENT 'ID' , `id` VARCHAR(50) NOT NULL COMMENT 'ID' ,
`ui_scenario_id` VARCHAR(50) NOT NULL COMMENT '场景ID' , `ui_scenario_id` VARCHAR(50) NOT NULL COMMENT '场景ID' ,
`create_time` BIGINT NOT NULL COMMENT '创建时间' , `create_time` BIGINT NOT NULL COMMENT '创建时间' ,
@ -130,8 +125,7 @@ CREATE INDEX idx_ui_scenario_id ON ui_scenario_reference(ui_scenario_id);
CREATE INDEX idx_reference_id ON ui_scenario_reference(reference_id); CREATE INDEX idx_reference_id ON ui_scenario_reference(reference_id);
CREATE INDEX idx_data_type ON ui_scenario_reference(data_type); CREATE INDEX idx_data_type ON ui_scenario_reference(data_type);
DROP TABLE IF EXISTS ui_scenario_report; CREATE TABLE IF NOT EXISTS ui_scenario_report(
CREATE TABLE ui_scenario_report(
`id` VARCHAR(50) NOT NULL COMMENT '报告ID' , `id` VARCHAR(50) NOT NULL COMMENT '报告ID' ,
`project_id` VARCHAR(50) NOT NULL COMMENT '项目ID' , `project_id` VARCHAR(50) NOT NULL COMMENT '项目ID' ,
`name` VARCHAR(255) NOT NULL COMMENT '报告名称' , `name` VARCHAR(255) NOT NULL COMMENT '报告名称' ,
@ -162,8 +156,7 @@ CREATE INDEX idx_trigger_mode ON ui_scenario_report(trigger_mode);
CREATE INDEX idx_status ON ui_scenario_report(status); CREATE INDEX idx_status ON ui_scenario_report(status);
CREATE INDEX idx_create_user ON ui_scenario_report(create_user); CREATE INDEX idx_create_user ON ui_scenario_report(create_user);
DROP TABLE IF EXISTS ui_scenario_report_detail; CREATE TABLE IF NOT EXISTS ui_scenario_report_detail(
CREATE TABLE ui_scenario_report_detail(
`id` VARCHAR(50) NOT NULL COMMENT 'ID' , `id` VARCHAR(50) NOT NULL COMMENT 'ID' ,
`resource_id` VARCHAR(50) NOT NULL COMMENT '资源id场景接口' , `resource_id` VARCHAR(50) NOT NULL COMMENT '资源id场景接口' ,
`report_id` VARCHAR(50) NOT NULL COMMENT '报告 id' , `report_id` VARCHAR(50) NOT NULL COMMENT '报告 id' ,
@ -183,8 +176,7 @@ CREATE INDEX idx_report_id ON ui_scenario_report_detail(report_id);
CREATE INDEX idx_create_time ON ui_scenario_report_detail(create_time); CREATE INDEX idx_create_time ON ui_scenario_report_detail(create_time);
CREATE INDEX idx_status ON ui_scenario_report_detail(status); CREATE INDEX idx_status ON ui_scenario_report_detail(status);
DROP TABLE IF EXISTS ui_scenario_report_structure; CREATE TABLE IF NOT EXISTS ui_scenario_report_structure(
CREATE TABLE ui_scenario_report_structure(
`id` VARCHAR(50) NOT NULL COMMENT 'ID' , `id` VARCHAR(50) NOT NULL COMMENT 'ID' ,
`report_id` VARCHAR(50) NOT NULL COMMENT '请求资源 id' , `report_id` VARCHAR(50) NOT NULL COMMENT '请求资源 id' ,
`create_time` BIGINT NOT NULL COMMENT '创建时间' , `create_time` BIGINT NOT NULL COMMENT '创建时间' ,
@ -195,8 +187,7 @@ CREATE TABLE ui_scenario_report_structure(
CREATE INDEX idx_report_id ON ui_scenario_report_structure(report_id); CREATE INDEX idx_report_id ON ui_scenario_report_structure(report_id);
DROP TABLE IF EXISTS ui_custom_command; CREATE TABLE IF NOT EXISTS ui_custom_command(
CREATE TABLE ui_custom_command(
`id` VARCHAR(50) NOT NULL COMMENT '场景ID' , `id` VARCHAR(50) NOT NULL COMMENT '场景ID' ,
`project_id` VARCHAR(50) NOT NULL COMMENT '项目ID' , `project_id` VARCHAR(50) NOT NULL COMMENT '项目ID' ,
`tags` VARCHAR(1000) COMMENT '标签' , `tags` VARCHAR(1000) COMMENT '标签' ,
@ -238,8 +229,7 @@ CREATE INDEX idx_num ON ui_custom_command(num);
CREATE INDEX idx_deleted ON ui_custom_command(deleted); CREATE INDEX idx_deleted ON ui_custom_command(deleted);
CREATE INDEX idx_create_user ON ui_custom_command(create_user); CREATE INDEX idx_create_user ON ui_custom_command(create_user);
DROP TABLE IF EXISTS ui_scenario_module; CREATE TABLE IF NOT EXISTS ui_scenario_module(
CREATE TABLE ui_scenario_module(
`id` VARCHAR(50) NOT NULL COMMENT '模块ID' , `id` VARCHAR(50) NOT NULL COMMENT '模块ID' ,
`project_id` VARCHAR(50) NOT NULL COMMENT '项目ID' , `project_id` VARCHAR(50) NOT NULL COMMENT '项目ID' ,
`name` VARCHAR(255) NOT NULL COMMENT '模块名称' , `name` VARCHAR(255) NOT NULL COMMENT '模块名称' ,
@ -259,8 +249,7 @@ CREATE INDEX idx_create_time ON ui_scenario_module(create_time);
CREATE INDEX idx_update_time ON ui_scenario_module(update_time); CREATE INDEX idx_update_time ON ui_scenario_module(update_time);
CREATE INDEX idx_create_user ON ui_scenario_module(create_user); CREATE INDEX idx_create_user ON ui_scenario_module(create_user);
DROP TABLE IF EXISTS ui_custom_command_module; CREATE TABLE IF NOT EXISTS ui_custom_command_module(
CREATE TABLE ui_custom_command_module(
`id` VARCHAR(50) NOT NULL COMMENT '模块ID' , `id` VARCHAR(50) NOT NULL COMMENT '模块ID' ,
`project_id` VARCHAR(50) NOT NULL COMMENT '项目ID' , `project_id` VARCHAR(50) NOT NULL COMMENT '项目ID' ,
`name` VARCHAR(255) NOT NULL COMMENT '模块名称' , `name` VARCHAR(255) NOT NULL COMMENT '模块名称' ,
@ -280,8 +269,7 @@ CREATE INDEX idx_create_time ON ui_custom_command_module(create_time);
CREATE INDEX idx_update_time ON ui_custom_command_module(update_time); CREATE INDEX idx_update_time ON ui_custom_command_module(update_time);
CREATE INDEX idx_create_user ON ui_custom_command_module(create_user); CREATE INDEX idx_create_user ON ui_custom_command_module(create_user);
DROP TABLE IF EXISTS ui_scenario_blob; CREATE TABLE IF NOT EXISTS ui_scenario_blob(
CREATE TABLE ui_scenario_blob(
`id` VARCHAR(50) NOT NULL COMMENT '场景ID' , `id` VARCHAR(50) NOT NULL COMMENT '场景ID' ,
`scenario_definition` LONGBLOB COMMENT '场景定义' , `scenario_definition` LONGBLOB COMMENT '场景定义' ,
`environment_json` BLOB COMMENT '环境' , `environment_json` BLOB COMMENT '环境' ,
@ -291,8 +279,7 @@ CREATE TABLE ui_scenario_blob(
CREATE INDEX idx_scenario_id ON ui_scenario_blob(id); CREATE INDEX idx_scenario_id ON ui_scenario_blob(id);
DROP TABLE IF EXISTS ui_scenario_report_environment; CREATE TABLE IF NOT EXISTS ui_scenario_report_environment(
CREATE TABLE ui_scenario_report_environment(
`report_id` VARCHAR(50) NOT NULL COMMENT '报告ID' , `report_id` VARCHAR(50) NOT NULL COMMENT '报告ID' ,
`project_id` VARCHAR(50) COMMENT '项目ID' , `project_id` VARCHAR(50) COMMENT '项目ID' ,
`environment_id` VARCHAR(50) COMMENT '环境ID' , `environment_id` VARCHAR(50) COMMENT '环境ID' ,
@ -302,8 +289,7 @@ CREATE TABLE ui_scenario_report_environment(
CREATE INDEX idx_report_id ON ui_scenario_report_environment(report_id); CREATE INDEX idx_report_id ON ui_scenario_report_environment(report_id);
DROP TABLE IF EXISTS ui_custom_command_blob; CREATE TABLE IF NOT EXISTS ui_custom_command_blob(
CREATE TABLE ui_custom_command_blob(
`id` VARCHAR(50) NOT NULL COMMENT '指令ID' , `id` VARCHAR(50) NOT NULL COMMENT '指令ID' ,
`scenario_definition` LONGBLOB COMMENT '场景定义' , `scenario_definition` LONGBLOB COMMENT '场景定义' ,
`command_view_struct` LONGBLOB COMMENT '自定义结构' , `command_view_struct` LONGBLOB COMMENT '自定义结构' ,
@ -313,8 +299,7 @@ CREATE TABLE ui_custom_command_blob(
CREATE INDEX idx_command_id ON ui_custom_command_blob(id); CREATE INDEX idx_command_id ON ui_custom_command_blob(id);
DROP TABLE IF EXISTS ui_scenario_report_log; CREATE TABLE IF NOT EXISTS ui_scenario_report_log(
CREATE TABLE ui_scenario_report_log(
`id` VARCHAR(50) NOT NULL COMMENT 'ID' , `id` VARCHAR(50) NOT NULL COMMENT 'ID' ,
`report_id` VARCHAR(50) NOT NULL COMMENT '请求资源 id' , `report_id` VARCHAR(50) NOT NULL COMMENT '请求资源 id' ,
`create_time` BIGINT NOT NULL COMMENT '创建时间' , `create_time` BIGINT NOT NULL COMMENT '创建时间' ,
@ -325,8 +310,7 @@ CREATE TABLE ui_scenario_report_log(
CREATE INDEX idx_report_id ON ui_scenario_report_log(report_id); CREATE INDEX idx_report_id ON ui_scenario_report_log(report_id);
DROP TABLE IF EXISTS ui_element_command_reference; CREATE TABLE IF NOT EXISTS ui_element_command_reference(
CREATE TABLE ui_element_command_reference(
`id` VARCHAR(50) NOT NULL COMMENT 'ID' , `id` VARCHAR(50) NOT NULL COMMENT 'ID' ,
`element_id` VARCHAR(50) NOT NULL COMMENT '元素ID' , `element_id` VARCHAR(50) NOT NULL COMMENT '元素ID' ,
`element_module_id` VARCHAR(50) NOT NULL COMMENT '元素模块ID' , `element_module_id` VARCHAR(50) NOT NULL COMMENT '元素模块ID' ,
@ -341,8 +325,7 @@ CREATE INDEX idx_command_id ON ui_element_command_reference(command_id);
CREATE INDEX idx_project_id ON ui_element_command_reference(project_id); CREATE INDEX idx_project_id ON ui_element_command_reference(project_id);
CREATE INDEX idx_element_module_id ON ui_element_command_reference(element_module_id); CREATE INDEX idx_element_module_id ON ui_element_command_reference(element_module_id);
DROP TABLE IF EXISTS ui_scenario_follower; CREATE TABLE IF NOT EXISTS ui_scenario_follower(
CREATE TABLE ui_scenario_follower(
`scenario_id` VARCHAR(50) NOT NULL COMMENT '场景ID' , `scenario_id` VARCHAR(50) NOT NULL COMMENT '场景ID' ,
`user_id` VARCHAR(50) NOT NULL COMMENT '关注人ID' , `user_id` VARCHAR(50) NOT NULL COMMENT '关注人ID' ,
PRIMARY KEY (scenario_id,user_id) PRIMARY KEY (scenario_id,user_id)

View File

@ -1,5 +0,0 @@
-- set innodb lock wait timeout
SET SESSION innodb_lock_wait_timeout = 7200;
-- set innodb lock wait timeout to default
SET SESSION innodb_lock_wait_timeout = DEFAULT;

View File

@ -12,13 +12,15 @@ VALUES ('admin', 'Administrator', 'admin@metersphere.io', MD5('metersphere'), UN
-- 初始化用户组 -- 初始化用户组
INSERT INTO user_role (id, name, description, internal, type, create_time, update_time, create_user, scope_id) VALUES ('admin', '系统管理员(系统)', '拥有系统全部组织以及项目的操作权限', 1, 'SYSTEM', 1621224000000, 1621224000000, 'admin', 'global'); INSERT INTO user_role (id, name, description, internal, type, create_time, update_time, create_user, scope_id) VALUES ('admin', '系统管理员(系统)', '拥有系统全部组织以及项目的操作权限', 1, 'SYSTEM', 1621224000000, 1621224000000, 'admin', 'global');
INSERT INTO user_role (id, name, description, internal, type, create_time, update_time, create_user, scope_id) VALUES ('member', '系统成员', '系统内初始化的用户', 1, 'SYSTEM', 1621224000000, 1621224000000, 'admin', 'global');
INSERT INTO user_role (id, name, description, internal, type, create_time, update_time, create_user, scope_id) VALUES ('org_admin', '组织管理员(系统)', '组织管理员', 1, 'ORGANIZATION', 1620674220007, 1620674220000, 'admin', 'global'); INSERT INTO user_role (id, name, description, internal, type, create_time, update_time, create_user, scope_id) VALUES ('org_admin', '组织管理员(系统)', '组织管理员', 1, 'ORGANIZATION', 1620674220007, 1620674220000, 'admin', 'global');
INSERT INTO user_role (id, name, description, internal, type, create_time, update_time, create_user, scope_id) VALUES ('org_member', '组织成员(系统)', '组织成员', 1, 'ORGANIZATION', 1620674220008, 1620674220000, 'admin', 'global'); INSERT INTO user_role (id, name, description, internal, type, create_time, update_time, create_user, scope_id) VALUES ('org_member', '组织成员(系统)', '组织成员', 1, 'ORGANIZATION', 1620674220008, 1620674220000, 'admin', 'global');
INSERT INTO user_role (id, name, description, internal, type, create_time, update_time, create_user, scope_id) VALUES ('project_admin', '项目管理员(系统)', '项目管理员', 1, 'PROJECT', 1620674220004, 1620674220000, 'admin', 'global'); INSERT INTO user_role (id, name, description, internal, type, create_time, update_time, create_user, scope_id) VALUES ('project_admin', '项目管理员(系统)', '项目管理员', 1, 'PROJECT', 1620674220004, 1620674220000, 'admin', 'global');
INSERT INTO user_role (id, name, description, internal, type, create_time, update_time, create_user, scope_id) VALUES ('project_member', '项目成员(系统)', '项目成员', 1, 'PROJECT', 1620674220005, 1620674220000, 'admin', 'global'); INSERT INTO user_role (id, name, description, internal, type, create_time, update_time, create_user, scope_id) VALUES ('project_member', '项目成员(系统)', '项目成员', 1, 'PROJECT', 1620674220005, 1620674220000, 'admin', 'global');
-- 初始化用户和组的关系 -- 初始化用户和组的关系
INSERT INTO user_role_relation (id, user_id, role_id, source_id, create_time, create_user) VALUES ('c3bb9b4f-46d8-4952-9681-8889974487d1', 'admin', 'admin', 'system', 1684747668375, 'admin'); INSERT INTO user_role_relation (id, user_id, role_id, source_id, create_time, create_user) VALUES (uuid(), 'admin', 'admin', 'system', 1684747668375, 'admin');
INSERT INTO user_role_relation (id, user_id, role_id, source_id, create_time, create_user) VALUES (uuid(), 'admin', 'member', 'system', 1684747668375, 'admin');
-- 初始化用户组权限 -- 初始化用户组权限

View File

@ -15,8 +15,8 @@
<modules> <modules>
<module>api-test</module> <module>api-test</module>
<module>case-management</module>
<module>bug-management</module> <module>bug-management</module>
<module>case-management</module>
<module>load-test</module> <module>load-test</module>
<module>project-management</module> <module>project-management</module>
<module>system-setting</module> <module>system-setting</module>

View File

@ -30,10 +30,9 @@
<pagehelper.version>5.3.2</pagehelper.version> <pagehelper.version>5.3.2</pagehelper.version>
<metersphere-jmeter-functions.version>1.5</metersphere-jmeter-functions.version> <metersphere-jmeter-functions.version>1.5</metersphere-jmeter-functions.version>
<quartz-starter.version>1.0.7</quartz-starter.version> <quartz-starter.version>1.0.7</quartz-starter.version>
<redisson-starter.version>3.21.3</redisson-starter.version> <redisson-starter.version>3.22.0</redisson-starter.version>
<guice.version>5.1.0</guice.version> <guice.version>5.1.0</guice.version>
<mybatis-starter.version>3.0.1</mybatis-starter.version> <mybatis-starter.version>3.0.2</mybatis-starter.version>
<mybatis-plus-starter.version>3.5.3.1</mybatis-plus-starter.version>
<reflections.version>0.10.2</reflections.version> <reflections.version>0.10.2</reflections.version>
<bcprov-jdk15on.version>1.70</bcprov-jdk15on.version> <bcprov-jdk15on.version>1.70</bcprov-jdk15on.version>
<commons-io.version>2.11.0</commons-io.version> <commons-io.version>2.11.0</commons-io.version>