Skip to content

Latest commit

 

History

History
51 lines (46 loc) · 3.39 KB

2.0.1to2.1.0log.md

File metadata and controls

51 lines (46 loc) · 3.39 KB

2.0.1 升级2.1.0 sql脚本

ALTER TABLE kongx_operation_log ADD ip VARCHAR (64);
CREATE TABLE `kongx_service_pipeline` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(1024) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '用户组名称',
  `create_at` timestamp NULL DEFAULT NULL COMMENT '创建时间',
  `creator` varchar(255) DEFAULT NULL COMMENT '创建人',
  `modifier` varchar(255) DEFAULT NULL COMMENT '修改人',
  `modify_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
  `remark` varchar(255) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '备注',
  `link_list` json DEFAULT NULL,
  `node_list` json DEFAULT NULL,
  `origin` json DEFAULT NULL,
  `profile` varchar(255) DEFAULT NULL COMMENT '所属环境',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
INSERT INTO `kongx_system_function` ( `parent_id`, `code`, `name`, `menu_icon`, `visit_view`, `visit_path`, `use_yn`, `menu_type`, `application_code`, `sort_order`) VALUES ( '-1', 'gateway-pipeline', '网关流水线', 'icon-pipeline', '', '', 'y', 'menu', 'kongx', '2');

INSERT INTO `kongx_system_function` (`parent_id`, `code`, `name`, `menu_icon`, `visit_view`,  `menu_type`, `application_code`)
select (select id from kongx_system_function where code='gateway-pipeline' and parent_id=-1) as parent_id ,'pipeline' as code,'Pipeline' as name,'icon-pipeline' as menu_icon ,'views/gateway/flow/index' as visit_view ,
'menu' as menu_type  ,'kongx' as application_code;

INSERT INTO `kongx_system_function` (`parent_id`, `code`, `name`, `menu_type`, `application_code`)
select (select id from kongx_system_function where code='pipeline') as parent_id ,'add_pipeline' as code,'新增流水线' as name,'point' as menu_type  ,'kongx' as application_code
union
select (select id from kongx_system_function where code='pipeline') as parent_id ,'update_pipeline' as code,'更新流水线' as name,'point' as menu_type  ,'kongx' as application_code
union
select (select id from kongx_system_function where code='pipeline') as parent_id ,'remove_pipeline' as code,'删除流水线' as name,'point' as menu_type  ,'kongx' as application_code
union
select (select id from kongx_system_function where code='pipeline') as parent_id ,'config_pipeline' as code,'配置流水线' as name,'point' as menu_type  ,'kongx' as application_code
union
select (select id from kongx_system_function where code='pipeline') as parent_id ,'view_pipeline' as code,'查看流水线' as name,'point' as menu_type  ,'kongx' as application_code
union
select (select id from kongx_system_function where code='pipeline') as parent_id ,'view_config_pipeline' as code,'查看流水线配置' as name,'point' as menu_type  ,'kongx' as application_code;


insert into kongx_system_role_function(role_id,half_checked,function_id)
select * from (
select '1' role_id,'n' half_checked,'-1' as function_id
union all
select '1' role_id,'n' half_checked,id as function_id from kongx_system_function
) a
where not EXISTS (select * from kongx_system_role_function b where a.function_id=b.function_id and b.role_id=a.role_id);

insert into kongx_system_role_function(role_id,half_checked,function_id)
select * from (
select '2' role_id,'n' half_checked,id as function_id from kongx_system_function where code like '%pipeline'
) a
where not EXISTS (select * from kongx_system_role_function b where a.function_id=b.function_id and b.role_id=a.role_id);