From cb717546ebd086c737a8239d6922e789c356c567 Mon Sep 17 00:00:00 2001 From: smallchill Date: Mon, 14 Sep 2020 16:00:41 +0800 Subject: [PATCH] =?UTF-8?q?:zap:=20=E4=BF=AE=E6=94=B9=E5=8C=BA=E5=88=92?= =?UTF-8?q?=E7=AD=89=E7=BA=A7=E5=AD=97=E6=AE=B5level=E4=B8=BAregionLevel?= =?UTF-8?q?=E4=BB=A5=E9=98=B2oracle=E5=9B=A0=E5=85=B3=E9=94=AE=E5=AD=97?= =?UTF-8?q?=E6=8A=A5=E9=94=99=EF=BC=8C=E7=94=A8=E6=88=B7=E8=A1=A8=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0userType=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- doc/sql/db/database-info.md | 3 +- doc/sql/update/mysql-update-2.5.1~2.6.0.sql | 94 -------------- doc/sql/update/mysql-update-2.6.0~2.6.1.sql | 11 ++ doc/sql/update/oracle-update-2.5.1~2.6.0.sql | 120 ------------------ doc/sql/update/oracle-update-2.6.0~2.6.1.sql | 12 ++ .../update/postgresql-update-2.5.1~2.6.0.sql | 120 ------------------ .../update/postgresql-update-2.6.0~2.6.1.sql | 11 ++ .../update/sqlserver-update-2.6.0~2.6.1.sql | 16 +++ 8 files changed, 52 insertions(+), 335 deletions(-) delete mode 100644 doc/sql/update/mysql-update-2.5.1~2.6.0.sql create mode 100644 doc/sql/update/mysql-update-2.6.0~2.6.1.sql delete mode 100644 doc/sql/update/oracle-update-2.5.1~2.6.0.sql create mode 100644 doc/sql/update/oracle-update-2.6.0~2.6.1.sql delete mode 100644 doc/sql/update/postgresql-update-2.5.1~2.6.0.sql create mode 100644 doc/sql/update/postgresql-update-2.6.0~2.6.1.sql create mode 100644 doc/sql/update/sqlserver-update-2.6.0~2.6.1.sql diff --git a/doc/sql/db/database-info.md b/doc/sql/db/database-info.md index ddd3e58f..df9cac24 100644 --- a/doc/sql/db/database-info.md +++ b/doc/sql/db/database-info.md @@ -327,7 +327,7 @@ Table: blade_region(行政区划表) | town_name | VARCHAR(32) | YES | | | 镇级名称 | | village_code | VARCHAR(12) | YES | | | 村级区划编号 | | village_name | VARCHAR(32) | YES | | | 村级名称 | -| level | INT(10) | YES | | | 层级 | +| region_level | INT(10) | YES | | | 层级 | | sort | INT(10) | YES | | | 排序 | | remark | VARCHAR(255) | YES | | | 备注 | @@ -491,6 +491,7 @@ Table: blade_user(用户表) | id | BIGINT(19) | NO | PRI | | 主键 | | tenant_id | VARCHAR(12) | YES | | 000000 | 租户ID | | code | VARCHAR(12) | YES | | | 用户编号 | +| user_type | SMALLINT(5) | YES | | | 用户平台 | | account | VARCHAR(45) | YES | | | 账号 | | password | VARCHAR(45) | YES | | | 密码 | | name | VARCHAR(20) | YES | | | 昵称 | diff --git a/doc/sql/update/mysql-update-2.5.1~2.6.0.sql b/doc/sql/update/mysql-update-2.5.1~2.6.0.sql deleted file mode 100644 index 8f95465a..00000000 --- a/doc/sql/update/mysql-update-2.5.1~2.6.0.sql +++ /dev/null @@ -1,94 +0,0 @@ --- ---------------------------- --- 第三方系统用户ID --- ---------------------------- -ALTER TABLE `blade_user_oauth` - ADD COLUMN `uuid` varchar(64) NULL COMMENT '第三方系统用户ID' AFTER `tenant_id`; - --- ---------------------------- --- 租户数据源ID --- ---------------------------- -ALTER TABLE `blade_tenant` - ADD COLUMN `datasource_id` bigint(64) NULL COMMENT '数据源' AFTER `expire_time`; - --- ---------------------------- --- 附件表 --- ---------------------------- -CREATE TABLE `blade_attach` ( - `id` bigint(64) NOT NULL COMMENT '主键', - `tenant_id` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '000000' COMMENT '租户ID', - `link` varchar(1000) NULL COMMENT '附件地址', - `domain` varchar(500) NULL COMMENT '附件域名', - `name` varchar(500) NULL COMMENT '附件名称', - `original_name` varchar(500) NULL COMMENT '附件原名', - `extension` varchar(12) NULL COMMENT '附件拓展名', - `attach_size` bigint(64) NULL DEFAULT NULL COMMENT '附件大小', - `create_user` bigint(64) NULL DEFAULT NULL COMMENT '创建人', - `create_dept` bigint(64) NULL DEFAULT NULL COMMENT '创建部门', - `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间', - `update_user` bigint(64) NULL DEFAULT NULL COMMENT '修改人', - `update_time` datetime(0) NULL DEFAULT NULL COMMENT '修改时间', - `status` int(2) NULL DEFAULT NULL COMMENT '状态', - `is_deleted` int(2) NULL DEFAULT NULL COMMENT '是否已删除', - PRIMARY KEY (`id`) -) COMMENT = '附件表' ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci; - --- ---------------------------- --- 插入附件表菜单数据 --- ---------------------------- -INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) -VALUES ('1164733399669962201', '1123598815738675298', 'attach', '附件管理', 'menu', '/resource/attach', 'iconfont iconicon_ding', 1, 1, 0, 1, NULL, 0); -INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) -VALUES ('1164733399669962202', '1164733399669962201', 'attach_upload', '上传', 'upload', '/resource/attach/upload', '', 1, 2, 1, 1, NULL, 0); -INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) -VALUES ('1164733399669962203', '1164733399669962201', 'attach_download', '下载', 'download', '/resource/attach/download', '', 2, 2, 2, 1, NULL, 0); -INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) -VALUES ('1164733399669962204', '1164733399669962201', 'attach_delete', '删除', 'delete', '/api/blade-resource/attach/remove', '', 3, 2, 3, 1, NULL, 0); - --- ---------------------------- --- 增加附件表菜单权限数据 --- ---------------------------- -INSERT INTO `blade_role_menu`(`id`,`menu_id`,`role_id`) -VALUES ('1161272893875227001', '1164733399669962201', '1123598816738675201'); -INSERT INTO `blade_role_menu`(`id`,`menu_id`,`role_id`) -VALUES ('1161272893875227002', '1164733399669962202', '1123598816738675201'); -INSERT INTO `blade_role_menu`(`id`,`menu_id`,`role_id`) -VALUES ('1161272893875227003', '1164733399669962203', '1123598816738675201'); -INSERT INTO `blade_role_menu`(`id`,`menu_id`,`role_id`) -VALUES ('1161272893875227004', '1164733399669962204', '1123598816738675201'); - --- ---------------------------- --- 报表文件表 --- ---------------------------- -CREATE TABLE `blade_report_file` ( - `id` bigint(64) NOT NULL COMMENT '主键', - `name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '文件名', - `content` mediumblob NULL COMMENT '文件内容', - `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间', - `update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间', - `is_deleted` int(2) NULL DEFAULT 0 COMMENT '是否已删除', - PRIMARY KEY (`id`) -) COMMENT = '报表文件表'; - --- ---------------------------- --- 插入报表文件表菜单数据 --- ---------------------------- -INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) -VALUES ('1164733399669962301', '0', 'report', '报表管理', 'menu', '/report', 'iconfont icon-shujuzhanshi2', 5, 1, 0, 1, NULL, 0); -INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) -VALUES ('1164733399669962302', '1164733399669962301', 'report_setting', '报表配置', 'menu', 'http://localhost:8108/ureport/designer', 'iconfont icon-rizhi', 1, 1, 0, 2, NULL, 0); -INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) -VALUES ('1164733399669962303', '1164733399669962301', 'report_list', '报表列表', 'menu', '/report/reportlist', 'iconfont icon-biaodan', 2, 1, 0, 1, NULL, 0); -INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) -VALUES ('1164733399669962304', '1164733399669962301', 'report_notice', '公告报表', 'menu', 'http://localhost:8108/ureport/preview?_u=blade-notice.ureport.xml', 'iconfont iconicon_sms', 3, 1, 0, 2, NULL, 0); - --- ---------------------------- --- 增加报表文件表菜单权限数据 --- ---------------------------- -INSERT INTO `blade_role_menu`(`id`,`menu_id`,`role_id`) -VALUES ('1161272893875228001', '1164733399669962301', '1123598816738675201'); -INSERT INTO `blade_role_menu`(`id`,`menu_id`,`role_id`) -VALUES ('1161272893875228002', '1164733399669962302', '1123598816738675201'); -INSERT INTO `blade_role_menu`(`id`,`menu_id`,`role_id`) -VALUES ('1161272893875228003', '1164733399669962303', '1123598816738675201'); -INSERT INTO `blade_role_menu`(`id`,`menu_id`,`role_id`) -VALUES ('1161272893875228004', '1164733399669962304', '1123598816738675201'); diff --git a/doc/sql/update/mysql-update-2.6.0~2.6.1.sql b/doc/sql/update/mysql-update-2.6.0~2.6.1.sql new file mode 100644 index 00000000..476db927 --- /dev/null +++ b/doc/sql/update/mysql-update-2.6.0~2.6.1.sql @@ -0,0 +1,11 @@ +-- ---------------------------- +-- 层级字段重命名 +-- ---------------------------- +ALTER TABLE `blade_region` + CHANGE COLUMN `level` `region_level` int(2) NULL DEFAULT NULL COMMENT '层级' AFTER `village_name`; + +-- ---------------------------- +-- 增加用户平台字段 +-- ---------------------------- +ALTER TABLE `blade_user` + ADD COLUMN `user_type` int(2) NULL COMMENT '用户平台' AFTER `code`; diff --git a/doc/sql/update/oracle-update-2.5.1~2.6.0.sql b/doc/sql/update/oracle-update-2.5.1~2.6.0.sql deleted file mode 100644 index 1469552a..00000000 --- a/doc/sql/update/oracle-update-2.5.1~2.6.0.sql +++ /dev/null @@ -1,120 +0,0 @@ --- ---------------------------- --- 第三方系统用户ID --- ---------------------------- -ALTER TABLE "BLADE_USER_OAUTH" - ADD ("UUID" VARCHAR2(64) ); -COMMENT ON COLUMN "BLADE_USER_OAUTH"."UUID" IS '第三方系统用户ID'; - --- ---------------------------- --- 租户数据源ID --- ---------------------------- -ALTER TABLE "BLADE_TENANT" - ADD ("DATASOURCE_ID" NUMBER(20) ); -COMMENT ON COLUMN "BLADE_TENANT"."DATASOURCE_ID" IS '数据源ID' - --- ---------------------------- --- 附件表 --- ---------------------------- -CREATE TABLE "BLADEX"."BLADE_ATTACH" ( - "ID" NUMBER(20) NOT NULL , - "TENANT_ID" NVARCHAR2(12) , - "LINK" VARCHAR2(1000) , - "DOMAIN" VARCHAR2(500) , - "NAME" VARCHAR2(500) , - "ORIGINAL_NAME" VARCHAR2(500) , - "EXTENSION" VARCHAR2(12) , - "ATTACH_SIZE" NUMBER(20) , - "CREATE_USER" NUMBER(20) , - "CREATE_DEPT" NUMBER(20) , - "CREATE_TIME" DATE , - "UPDATE_USER" NUMBER(20) , - "UPDATE_TIME" DATE , - "STATUS" NUMBER(11) , - "IS_DELETED" NUMBER(11) , - PRIMARY KEY ("ID") -) -; -COMMENT ON COLUMN "BLADEX"."BLADE_ATTACH"."ID" IS '主键'; -COMMENT ON COLUMN "BLADEX"."BLADE_ATTACH"."TENANT_ID" IS '租户ID'; -COMMENT ON COLUMN "BLADEX"."BLADE_ATTACH"."LINK" IS '附件地址'; -COMMENT ON COLUMN "BLADEX"."BLADE_ATTACH"."DOMAIN" IS '附件域名'; -COMMENT ON COLUMN "BLADEX"."BLADE_ATTACH"."NAME" IS '附件名称'; -COMMENT ON COLUMN "BLADEX"."BLADE_ATTACH"."ORIGINAL_NAME" IS '附件原名'; -COMMENT ON COLUMN "BLADEX"."BLADE_ATTACH"."EXTENSION" IS '附件拓展名'; -COMMENT ON COLUMN "BLADEX"."BLADE_ATTACH"."ATTACH_SIZE" IS '附件大小'; -COMMENT ON COLUMN "BLADEX"."BLADE_ATTACH"."CREATE_USER" IS '创建人'; -COMMENT ON COLUMN "BLADEX"."BLADE_ATTACH"."CREATE_DEPT" IS '创建部门'; -COMMENT ON COLUMN "BLADEX"."BLADE_ATTACH"."CREATE_TIME" IS '创建时间'; -COMMENT ON COLUMN "BLADEX"."BLADE_ATTACH"."UPDATE_USER" IS '修改人'; -COMMENT ON COLUMN "BLADEX"."BLADE_ATTACH"."UPDATE_TIME" IS '修改时间'; -COMMENT ON COLUMN "BLADEX"."BLADE_ATTACH"."STATUS" IS '状态'; -COMMENT ON COLUMN "BLADEX"."BLADE_ATTACH"."IS_DELETED" IS '是否已删除'; -COMMENT ON TABLE "BLADEX"."BLADE_ATTACH" IS '附件表'; - --- ---------------------------- --- 插入附件表菜单数据 --- ---------------------------- -INSERT INTO "BLADEX"."BLADE_MENU"("ID", "PARENT_ID", "CODE", "NAME", "ALIAS", "PATH", "SOURCE", "SORT", "CATEGORY", "ACTION", "IS_OPEN", "REMARK", "IS_DELETED") -VALUES ('1164733399669962201', '1123598815738675298', 'attach', '附件管理', 'menu', '/resource/attach', 'iconfont iconicon_ding', 1, 1, 0, 1, NULL, 0); -INSERT INTO "BLADEX"."BLADE_MENU"("ID", "PARENT_ID", "CODE", "NAME", "ALIAS", "PATH", "SOURCE", "SORT", "CATEGORY", "ACTION", "IS_OPEN", "REMARK", "IS_DELETED") -VALUES ('1164733399669962202', '1164733399669962201', 'attach_upload', '上传', 'upload', '/resource/attach/upload', '', 1, 2, 1, 1, NULL, 0); -INSERT INTO "BLADEX"."BLADE_MENU"("ID", "PARENT_ID", "CODE", "NAME", "ALIAS", "PATH", "SOURCE", "SORT", "CATEGORY", "ACTION", "IS_OPEN", "REMARK", "IS_DELETED") -VALUES ('1164733399669962203', '1164733399669962201', 'attach_download', '下载', 'download', '/resource/attach/download', '', 2, 2, 2, 1, NULL, 0); -INSERT INTO "BLADEX"."BLADE_MENU"("ID", "PARENT_ID", "CODE", "NAME", "ALIAS", "PATH", "SOURCE", "SORT", "CATEGORY", "ACTION", "IS_OPEN", "REMARK", "IS_DELETED") -VALUES ('1164733399669962204', '1164733399669962201', 'attach_delete', '删除', 'delete', '/api/blade-resource/attach/remove', '', 3, 2, 3, 1, NULL, 0); - --- ---------------------------- --- 增加附件表菜单权限数据 --- ---------------------------- -INSERT INTO "BLADEX"."BLADE_ROLE_MENU"("ID","MENU_ID","ROLE_ID") -VALUES ('1161272893875227001', '1164733399669962201', '1123598816738675201'); -INSERT INTO "BLADEX"."BLADE_ROLE_MENU"("ID","MENU_ID","ROLE_ID") -VALUES ('1161272893875227002', '1164733399669962202', '1123598816738675201'); -INSERT INTO "BLADEX"."BLADE_ROLE_MENU"("ID","MENU_ID","ROLE_ID") -VALUES ('1161272893875227003', '1164733399669962203', '1123598816738675201'); -INSERT INTO "BLADEX"."BLADE_ROLE_MENU"("ID","MENU_ID","ROLE_ID") -VALUES ('1161272893875227004', '1164733399669962204', '1123598816738675201'); - --- ---------------------------- --- 报表文件表 --- ---------------------------- -CREATE TABLE "BLADEX"."BLADE_REPORT_FILE" ( - "ID" NUMBER(20) NOT NULL , - "NAME" NVARCHAR2(100) NOT NULL , - "CONTENT" BLOB , - "CREATE_TIME" DATE NOT NULL , - "UPDATE_TIME" DATE NOT NULL , - "IS_DELETED" NUMBER(11) DEFAULT 0 , - PRIMARY KEY ("ID") -); -COMMENT ON COLUMN "BLADEX"."BLADE_REPORT_FILE"."ID" IS '主键'; -COMMENT ON COLUMN "BLADEX"."BLADE_REPORT_FILE"."NAME" IS '文件名'; -COMMENT ON COLUMN "BLADEX"."BLADE_REPORT_FILE"."CONTENT" IS '文件内容'; -COMMENT ON COLUMN "BLADEX"."BLADE_REPORT_FILE"."CREATE_TIME" IS '创建时间'; -COMMENT ON COLUMN "BLADEX"."BLADE_REPORT_FILE"."UPDATE_TIME" IS '更新时间'; -COMMENT ON COLUMN "BLADEX"."BLADE_REPORT_FILE"."IS_DELETED" IS '是否已删除'; -COMMENT ON TABLE "BLADEX"."BLADE_REPORT_FILE" IS '报表文件表'; - --- ---------------------------- --- 插入报表文件表菜单数据 --- ---------------------------- -INSERT INTO "BLADEX"."BLADE_MENU"("ID", "PARENT_ID", "CODE", "NAME", "ALIAS", "PATH", "SOURCE", "SORT", "CATEGORY", "ACTION", "IS_OPEN", "REMARK", "IS_DELETED") -VALUES ('1164733399669962301', '0', 'report', '报表管理', 'menu', '/report', 'iconfont icon-shujuzhanshi2', 5, 1, 0, 1, NULL, 0); -INSERT INTO "BLADEX"."BLADE_MENU"("ID", "PARENT_ID", "CODE", "NAME", "ALIAS", "PATH", "SOURCE", "SORT", "CATEGORY", "ACTION", "IS_OPEN", "REMARK", "IS_DELETED") -VALUES ('1164733399669962302', '1164733399669962301', 'report_setting', '报表配置', 'menu', 'http://localhost:8108/ureport/designer', 'iconfont icon-rizhi', 1, 1, 0, 2, NULL, 0); -INSERT INTO "BLADEX"."BLADE_MENU"("ID", "PARENT_ID", "CODE", "NAME", "ALIAS", "PATH", "SOURCE", "SORT", "CATEGORY", "ACTION", "IS_OPEN", "REMARK", "IS_DELETED") -VALUES ('1164733399669962303', '1164733399669962301', 'report_list', '报表列表', 'menu', '/report/reportlist', 'iconfont icon-biaodan', 2, 1, 0, 1, NULL, 0); -INSERT INTO "BLADEX"."BLADE_MENU"("ID", "PARENT_ID", "CODE", "NAME", "ALIAS", "PATH", "SOURCE", "SORT", "CATEGORY", "ACTION", "IS_OPEN", "REMARK", "IS_DELETED") -VALUES ('1164733399669962304', '1164733399669962301', 'report_notice', '公告报表', 'menu', 'http://localhost:8108/ureport/preview?_u=blade-notice.ureport.xml', 'iconfont iconicon_sms', 3, 1, 0, 2, NULL, 0); - --- ---------------------------- --- 增加报表文件表菜单权限数据 --- ---------------------------- -INSERT INTO "BLADEX"."BLADE_ROLE_MENU"("ID","MENU_ID","ROLE_ID") -VALUES ('1161272893875228001', '1164733399669962301', '1123598816738675201'); -INSERT INTO "BLADEX"."BLADE_ROLE_MENU"("ID","MENU_ID","ROLE_ID") -VALUES ('1161272893875228002', '1164733399669962302', '1123598816738675201'); -INSERT INTO "BLADEX"."BLADE_ROLE_MENU"("ID","MENU_ID","ROLE_ID") -VALUES ('1161272893875228003', '1164733399669962303', '1123598816738675201'); -INSERT INTO "BLADEX"."BLADE_ROLE_MENU"("ID","MENU_ID","ROLE_ID") -VALUES ('1161272893875228004', '1164733399669962304', '1123598816738675201'); diff --git a/doc/sql/update/oracle-update-2.6.0~2.6.1.sql b/doc/sql/update/oracle-update-2.6.0~2.6.1.sql new file mode 100644 index 00000000..5b5b9008 --- /dev/null +++ b/doc/sql/update/oracle-update-2.6.0~2.6.1.sql @@ -0,0 +1,12 @@ +-- ---------------------------- +-- 层级字段重命名 +-- ---------------------------- +ALTER TABLE "BLADE_REGION" RENAME COLUMN "LEVEL" TO "REGION_LEVEL"; + +-- ---------------------------- +-- 增加用户平台字段 +-- ---------------------------- +ALTER TABLE "BLADE_USER" + ADD ("USER_TYPE" NUMBER(6) ); + +COMMENT ON COLUMN "BLADE_USER"."USER_TYPE" IS '用户平台'; diff --git a/doc/sql/update/postgresql-update-2.5.1~2.6.0.sql b/doc/sql/update/postgresql-update-2.5.1~2.6.0.sql deleted file mode 100644 index ec89f606..00000000 --- a/doc/sql/update/postgresql-update-2.5.1~2.6.0.sql +++ /dev/null @@ -1,120 +0,0 @@ --- ---------------------------- --- 第三方系统用户ID --- ---------------------------- -ALTER TABLE "blade_user_oauth" - ADD COLUMN "uuid" varchar(64) COLLATE "pg_catalog"."default"; -COMMENT ON COLUMN "blade_user_oauth"."uuid" IS '第三方系统用户ID'; - --- ---------------------------- --- 租户数据源ID --- ---------------------------- -ALTER TABLE "blade_tenant" - ADD COLUMN "datasource_id" int8; -COMMENT ON COLUMN "blade_tenant"."datasource_id" IS '数据源ID'; - --- ---------------------------- --- 附件表 --- ---------------------------- -CREATE TABLE "blade_attach" ( - "id" int8 NOT NULL, - "tenant_id" varchar(12) COLLATE "pg_catalog"."default", - "link" varchar(1000), - "domain" varchar(500), - "name" varchar(500), - "original_name" varchar(500), - "extension" varchar(12), - "attach_size" int8, - "create_user" int8, - "create_dept" int8, - "create_time" timestamp(6), - "update_user" int8, - "update_time" timestamp(6), - "status" int4, - "is_deleted" int4, - PRIMARY KEY ("id") -) -; -COMMENT ON COLUMN "blade_attach"."id" IS '主键'; -COMMENT ON COLUMN "blade_attach"."tenant_id" IS '租户ID'; -COMMENT ON COLUMN "blade_attach"."link" IS '附件地址'; -COMMENT ON COLUMN "blade_attach"."domain" IS '附件域名'; -COMMENT ON COLUMN "blade_attach"."name" IS '附件名称'; -COMMENT ON COLUMN "blade_attach"."original_name" IS '附件原名'; -COMMENT ON COLUMN "blade_attach"."extension" IS '附件拓展名'; -COMMENT ON COLUMN "blade_attach"."attach_size" IS '附件大小'; -COMMENT ON COLUMN "blade_attach"."create_user" IS '创建人'; -COMMENT ON COLUMN "blade_attach"."create_dept" IS '创建部门'; -COMMENT ON COLUMN "blade_attach"."create_time" IS '创建时间'; -COMMENT ON COLUMN "blade_attach"."update_user" IS '修改人'; -COMMENT ON COLUMN "blade_attach"."update_time" IS '修改时间'; -COMMENT ON COLUMN "blade_attach"."status" IS '状态'; -COMMENT ON COLUMN "blade_attach"."is_deleted" IS '是否已删除'; - - --- ---------------------------- --- 插入附件表菜单数据 --- ---------------------------- -INSERT INTO "blade_menu"("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "remark", "is_deleted") -VALUES ('1164733399669962201', '1123598815738675298', 'attach', '附件管理', 'menu', '/resource/attach', 'iconfont iconicon_ding', 1, 1, 0, 1, NULL, 0); -INSERT INTO "blade_menu"("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "remark", "is_deleted") -VALUES ('1164733399669962202', '1164733399669962201', 'attach_upload', '上传', 'upload', '/resource/attach/upload', '', 1, 2, 1, 1, NULL, 0); -INSERT INTO "blade_menu"("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "remark", "is_deleted") -VALUES ('1164733399669962203', '1164733399669962201', 'attach_download', '下载', 'download', '/resource/attach/download', '', 2, 2, 2, 1, NULL, 0); -INSERT INTO "blade_menu"("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "remark", "is_deleted") -VALUES ('1164733399669962204', '1164733399669962201', 'attach_delete', '删除', 'delete', '/api/blade-resource/attach/remove', '', 3, 2, 3, 1, NULL, 0); - --- ---------------------------- --- 增加附件表菜单权限数据 --- ---------------------------- -INSERT INTO "blade_role_menu"("id","menu_id","role_id") -VALUES ('1161272893875227001', '1164733399669962201', '1123598816738675201'); -INSERT INTO "blade_role_menu"("id","menu_id","role_id") -VALUES ('1161272893875227002', '1164733399669962202', '1123598816738675201'); -INSERT INTO "blade_role_menu"("id","menu_id","role_id") -VALUES ('1161272893875227003', '1164733399669962203', '1123598816738675201'); -INSERT INTO "blade_role_menu"("id","menu_id","role_id") -VALUES ('1161272893875227004', '1164733399669962204', '1123598816738675201'); - --- ---------------------------- --- 报表文件表 --- ---------------------------- -CREATE TABLE "blade_report_file" ( - "id" int8 NOT NULL, - "name" varchar(100) COLLATE "pg_catalog"."default" NOT NULL, - "content" bytea, - "create_time" timestamp(6) NOT NULL, - "update_time" timestamp(6) NOT NULL, - "is_deleted" int4, - PRIMARY KEY ("id") -); -COMMENT ON COLUMN "blade_report_file"."id" IS '主键'; -COMMENT ON COLUMN "blade_report_file"."name" IS '文件名'; -COMMENT ON COLUMN "blade_report_file"."content" IS '文件内容'; -COMMENT ON COLUMN "blade_report_file"."create_time" IS '创建时间'; -COMMENT ON COLUMN "blade_report_file"."update_time" IS '更新时间'; -COMMENT ON COLUMN "blade_report_file"."is_deleted" IS '是否已删除'; -COMMENT ON TABLE "blade_report_file" IS '报表文件表'; - --- ---------------------------- --- 插入报表文件表菜单数据 --- ---------------------------- -INSERT INTO "blade_menu"("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "remark", "is_deleted") -VALUES ('1164733399669962301', '0', 'report', '报表管理', 'menu', '/report', 'iconfont icon-shujuzhanshi2', 5, 1, 0, 1, NULL, 0); -INSERT INTO "blade_menu"("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "remark", "is_deleted") -VALUES ('1164733399669962302', '1164733399669962301', 'report_setting', '报表配置', 'menu', 'http://localhost:8108/ureport/designer', 'iconfont icon-rizhi', 1, 1, 0, 2, NULL, 0); -INSERT INTO "blade_menu"("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "remark", "is_deleted") -VALUES ('1164733399669962303', '1164733399669962301', 'report_list', '报表列表', 'menu', '/report/reportlist', 'iconfont icon-biaodan', 2, 1, 0, 1, NULL, 0); -INSERT INTO "blade_menu"("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "remark", "is_deleted") -VALUES ('1164733399669962304', '1164733399669962301', 'report_notice', '公告报表', 'menu', 'http://localhost:8108/ureport/preview?_u=blade-notice.ureport.xml', 'iconfont iconicon_sms', 3, 1, 0, 2, NULL, 0); - --- ---------------------------- --- 增加报表文件表菜单权限数据 --- ---------------------------- -INSERT INTO "blade_role_menu"("id","menu_id","role_id") -VALUES ('1161272893875228001', '1164733399669962301', '1123598816738675201'); -INSERT INTO "blade_role_menu"("id","menu_id","role_id") -VALUES ('1161272893875228002', '1164733399669962302', '1123598816738675201'); -INSERT INTO "blade_role_menu"("id","menu_id","role_id") -VALUES ('1161272893875228003', '1164733399669962303', '1123598816738675201'); -INSERT INTO "blade_role_menu"("id","menu_id","role_id") -VALUES ('1161272893875228004', '1164733399669962304', '1123598816738675201'); diff --git a/doc/sql/update/postgresql-update-2.6.0~2.6.1.sql b/doc/sql/update/postgresql-update-2.6.0~2.6.1.sql new file mode 100644 index 00000000..a0b95552 --- /dev/null +++ b/doc/sql/update/postgresql-update-2.6.0~2.6.1.sql @@ -0,0 +1,11 @@ +-- ---------------------------- +-- 层级字段重命名 +-- ---------------------------- +ALTER TABLE "blade_region" RENAME COLUMN "level" TO "region_level"; + +-- ---------------------------- +-- 增加用户平台字段 +-- ---------------------------- +ALTER TABLE "blade_user" + ADD COLUMN "user_type" int2; +COMMENT ON COLUMN "public"."blade_user"."user_type" IS '用户平台'; diff --git a/doc/sql/update/sqlserver-update-2.6.0~2.6.1.sql b/doc/sql/update/sqlserver-update-2.6.0~2.6.1.sql new file mode 100644 index 00000000..99486414 --- /dev/null +++ b/doc/sql/update/sqlserver-update-2.6.0~2.6.1.sql @@ -0,0 +1,16 @@ +-- ---------------------------- +-- 层级字段重命名 +-- ---------------------------- +EXEC sp_rename '[dbo].[blade_region].[level]', 'region_level', 'COLUMN'; + +-- ---------------------------- +-- 增加用户平台字段 +-- ---------------------------- +ALTER TABLE [dbo].[blade_user] ADD [user_type] int + GO + + EXEC sp_addextendedproperty + 'MS_Description', N'用户平台', + 'SCHEMA', N'dbo', + 'TABLE', N'blade_user', + 'COLUMN', N'user_type'