完善PostgreSQL数据库多租户功能升级脚本
This commit is contained in:
parent
bfe02a50ac
commit
873d809df5
@ -2,7 +2,7 @@
|
||||
<img alt="logo" src="https://gitee.com/dataprince/ruoyi-flex/raw/master/image/ruoyi-flex-logo.png">
|
||||
</p>
|
||||
<h1 align="center" style="margin: 30px 0 30px; font-weight: bold;">Ruoyi-Flex V4.2.0</h1>
|
||||
<h4 align="center">Ruoyi-Flex是基于JDK21、Spring Boot V3.2.X+平台 前后端分离的Java快速开发框架</h4>
|
||||
<h4 align="center">Ruoyi-Flex是基于JDK21、Spring Boot V3.2.X+平台 前后端分离的未来8年更快的Java开发框架</h4>
|
||||
|
||||
|
||||
## 1、平台简介
|
||||
|
@ -1,11 +1,11 @@
|
||||
----升级 from V4.2.0 to V5.0.0:
|
||||
--修正“任务调度”的“任务管理”错误:
|
||||
---- 升级 from V4.2.0 to V5.0.0:
|
||||
-- 修正“任务调度”的“任务管理”错误:
|
||||
UPDATE "public"."pj_job_info" SET "alarm_config"='{"alertThreshold":0,"silenceWindowLen":0,"statisticWindowLen":0}', "log_config"='{"type":1}', "processor_info"='com.ruoyi.job.processors.StandaloneProcessorDemo' WHERE "id"=1;
|
||||
UPDATE "public"."pj_job_info" SET "alarm_config"='{"alertThreshold":0,"silenceWindowLen":0,"statisticWindowLen":0}', "log_config"='{"type":1}', "processor_info"='com.ruoyi.job.processors.BroadcastProcessorDemo' WHERE "id"=2;
|
||||
UPDATE "public"."pj_job_info" SET "alarm_config"='{"alertThreshold":0,"silenceWindowLen":0,"statisticWindowLen":0}', "log_config"='{"type":1}', "processor_info"='com.ruoyi.job.processors.MapProcessorDemo' WHERE "id"=3;
|
||||
UPDATE "public"."pj_job_info" SET "alarm_config"='{"alertThreshold":0,"silenceWindowLen":0,"statisticWindowLen":0}', "log_config"='{"type":1}', "processor_info"='com.ruoyi.job.processors.MapReduceProcessorDemo' WHERE "id"=4;
|
||||
|
||||
--修改powerjob的库结构的错误oid类型为text类型;
|
||||
-- 修改powerjob的库结构的错误oid类型为text类型;
|
||||
ALTER TABLE "pj_workflow_info"
|
||||
ALTER COLUMN "pedag" TYPE TEXT,
|
||||
ALTER COLUMN "pedag" DROP NOT NULL,
|
||||
@ -42,7 +42,7 @@ ALTER COLUMN "node_params" TYPE TEXT,
|
||||
ALTER COLUMN "node_params" DROP DEFAULT;
|
||||
COMMENT ON COLUMN "pj_workflow_node_info"."node_params" IS '';
|
||||
|
||||
--升级“文件管理配置”相关脚本
|
||||
-- 升级“文件管理配置”相关脚本
|
||||
delete from sys_menu where menu_id in (1604, 1605);
|
||||
insert into sys_menu values('1600', '文件查询', '118', '1', '#', '', '', '1', '0', 'F', '0', '0', 'system:oss:query', '#', 1, now(), null, null, '');
|
||||
insert into sys_menu values('1601', '文件上传', '118', '2', '#', '', '', '1', '0', 'F', '0', '0', 'system:oss:upload', '#', 1, now(), null, null, '');
|
||||
@ -53,7 +53,7 @@ insert into sys_menu values('1621', '配置添加', '118', '6', '#', '', '', '1'
|
||||
insert into sys_menu values('1622', '配置编辑', '118', '6', '#', '', '', '1', '0', 'F', '0', '0', 'system:ossConfig:edit', '#', 1, now(), null, null, '');
|
||||
insert into sys_menu values('1623', '配置删除', '118', '6', '#', '', '', '1', '0', 'F', '0', '0', 'system:ossConfig:remove', '#', 1, now(), null, null, '');
|
||||
|
||||
--postgresql创建与mysql等效的的find_in_set函数
|
||||
-- postgresql创建与mysql等效的的find_in_set函数
|
||||
CREATE OR REPLACE FUNCTION find_in_set(
|
||||
value anyelement,
|
||||
string_list text)
|
||||
@ -194,7 +194,7 @@ COMMENT ON COLUMN "sys_user"."email" IS '用户邮箱';
|
||||
DROP INDEX if exists sys_user_unqindex_tenant_username;
|
||||
CREATE UNIQUE INDEX sys_user_unqindex_tenant_username ON sys_user(tenant_id, user_name);
|
||||
|
||||
--修改“超级用户”为"superadmin"
|
||||
-- 修改“超级用户”为"superadmin"
|
||||
UPDATE sys_user SET user_name='superadmin',nick_name='超级管理员' WHERE user_id=1;
|
||||
|
||||
ALTER TABLE "sys_logininfor"
|
||||
@ -207,7 +207,7 @@ ALTER TABLE "sys_logininfor"
|
||||
ADD "device_type" VARCHAR(32) NULL DEFAULT '';
|
||||
COMMENT ON COLUMN "sys_logininfor"."device_type" IS '设备类型';
|
||||
|
||||
--客户端管理菜单
|
||||
-- 客户端管理菜单
|
||||
insert into sys_menu values('123', '客户端管理', '1', '11', 'client', 'system/client/index', '', '1', '0', 'C', '0', '0', 'system:client:list', 'international', 1, now(), null, null, '客户端管理菜单');
|
||||
-- 客户端管理按钮
|
||||
insert into sys_menu values('1061', '客户端管理查询', '123', '1', '#', '', '', '1', '0', 'F', '0', '0', 'system:client:query', '#', 1, now(), null, null, '');
|
||||
@ -216,25 +216,25 @@ insert into sys_menu values('1063', '客户端管理修改', '123', '3', '#', '
|
||||
insert into sys_menu values('1064', '客户端管理删除', '123', '4', '#', '', '', '1', '0', 'F', '0', '0', 'system:client:remove', '#', 1, now(), null, null, '');
|
||||
insert into sys_menu values('1065', '客户端管理导出', '123', '5', '#', '', '', '1', '0', 'F', '0', '0', 'system:client:export', '#', 1, now(), null, null, '');
|
||||
|
||||
--操作日志租户编号
|
||||
-- 操作日志租户编号
|
||||
ALTER TABLE "sys_oper_log" ADD "tenant_id" BIGINT NOT NULL DEFAULT '0';
|
||||
COMMENT ON COLUMN "sys_oper_log"."tenant_id" IS '租户编号';
|
||||
|
||||
--岗位
|
||||
-- 岗位
|
||||
ALTER TABLE "sys_post" ADD "tenant_id" BIGINT NOT NULL DEFAULT '0';
|
||||
COMMENT ON COLUMN "sys_post"."tenant_id" IS '租户编号';
|
||||
|
||||
--通知公告
|
||||
-- 通知公告
|
||||
ALTER TABLE "sys_notice" ADD "tenant_id" BIGINT NOT NULL DEFAULT '0';
|
||||
COMMENT ON COLUMN "sys_notice"."tenant_id" IS '租户编号';
|
||||
|
||||
--文件管理
|
||||
-- 文件管理
|
||||
ALTER TABLE "sys_oss_config" ADD "tenant_id" BIGINT NOT NULL DEFAULT '0';
|
||||
COMMENT ON COLUMN "sys_oss_config"."tenant_id" IS '租户编码';
|
||||
ALTER TABLE "sys_oss" ADD "tenant_id" BIGINT NOT NULL DEFAULT '0';
|
||||
COMMENT ON COLUMN "sys_oss"."tenant_id" IS '租户编码';
|
||||
|
||||
--演示表
|
||||
-- 演示表
|
||||
ALTER TABLE "mf_student" ADD "tenant_id" BIGINT NOT NULL DEFAULT '0';
|
||||
COMMENT ON COLUMN "mf_student"."tenant_id" IS '租户编码';
|
||||
ALTER TABLE "mf_product" ADD "tenant_id" BIGINT NOT NULL DEFAULT '0';
|
||||
|
Loading…
Reference in New Issue
Block a user