Browse Source

增强租户管理,增加绑定域名、背景图、账号额度、过期时间

test
smallchill 5 years ago
parent
commit
bbb9b3f925
  1. 27
      blade-service-api/blade-system-api/src/main/java/org/springblade/system/entity/Tenant.java
  2. 20
      blade-service/blade-system/src/main/java/org/springblade/system/controller/TenantController.java
  3. 5
      blade-service/blade-system/src/main/java/org/springblade/system/mapper/TenantMapper.xml
  4. 1
      blade-service/blade-system/src/main/java/org/springblade/system/service/impl/TenantServiceImpl.java
  5. 27
      doc/sql/mysql/bladex-saber-mysql.sql
  6. 25
      doc/sql/mysql/bladex-sword-mysql.sql
  7. 105
      doc/sql/oracle/bladex-saber-oracle.sql
  8. 107
      doc/sql/oracle/bladex-sword-oracle.sql
  9. 14
      doc/sql/postgresql/bladex-saber-postgresql.sql
  10. 40
      doc/sql/postgresql/bladex-sword-postgresql.sql
  11. 69
      doc/sql/update/mysql-update-2.2.1~2.2.2.sql
  12. 20
      doc/sql/update/mysql-update-2.2.2~2.3.0.sql
  13. 90
      doc/sql/update/oracle-update-2.2.1~2.2.2.sql
  14. 26
      doc/sql/update/oracle-update-2.2.2~2.3.0.sql
  15. 81
      doc/sql/update/postgresql-update-2.2.1~2.2.2.sql
  16. 25
      doc/sql/update/postgresql-update-2.2.2~2.3.0.sql

27
blade-service-api/blade-system-api/src/main/java/org/springblade/system/entity/Tenant.java

@ -17,11 +17,16 @@
package org.springblade.system.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springblade.core.mp.base.BaseEntity;
import org.springblade.core.tool.utils.DateUtil;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
/**
* 实体类
@ -46,6 +51,16 @@ public class Tenant extends BaseEntity {
*/
@ApiModelProperty(value = "租户名称")
private String tenantName;
/**
* 域名地址
*/
@ApiModelProperty(value = "域名地址")
private String domain;
/**
* 系统背景
*/
@ApiModelProperty(value = "系统背景")
private String backgroundUrl;
/**
* 联系人
*/
@ -61,6 +76,18 @@ public class Tenant extends BaseEntity {
*/
@ApiModelProperty(value = "联系地址")
private String address;
/**
* 账号额度
*/
@ApiModelProperty(value = "账号额度")
private Integer accountNumber;
/**
* 过期时间
*/
@DateTimeFormat(pattern = DateUtil.PATTERN_DATETIME)
@JsonFormat(pattern = DateUtil.PATTERN_DATETIME)
@ApiModelProperty(value = "过期时间")
private Date expireTime;
}

20
blade-service/blade-system/src/main/java/org/springblade/system/controller/TenantController.java

@ -37,6 +37,7 @@ import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import javax.validation.Valid;
import java.util.Date;
import java.util.List;
import java.util.Map;
@ -132,13 +133,30 @@ public class TenantController extends BladeController {
return R.status(tenantService.deleteLogic(Func.toLongList(ids)));
}
/**
* 授权配置
*/
@PostMapping("/setting")
@ApiOperationSupport(order = 7)
@ApiOperation(value = "授权配置", notes = "传入ids,accountNumber,expireTime")
@PreAuth(RoleConstant.HAS_ROLE_ADMINISTRATOR)
public R setting(@ApiParam(value = "主键集合", required = true) @RequestParam String ids, @ApiParam(value = "账号额度") Integer accountNumber, @ApiParam(value = "过期时间") Date expireTime) {
boolean temp = tenantService.update(
Wrappers.<Tenant>update().lambda()
.set(Tenant::getAccountNumber, accountNumber)
.set(Tenant::getExpireTime, expireTime)
.in(Tenant::getId, Func.toLongList(ids))
);
return R.status(temp);
}
/**
* 根据名称查询列表
*
* @param name 租户名称
*/
@GetMapping("/find-by-name")
@ApiOperationSupport(order = 7)
@ApiOperationSupport(order = 8)
@ApiOperation(value = "详情", notes = "传入tenant")
@PreAuth(RoleConstant.HAS_ROLE_ADMIN)
public R<List<Tenant>> findByName(String name) {

5
blade-service/blade-system/src/main/java/org/springblade/system/mapper/TenantMapper.xml

@ -11,10 +11,15 @@
<result column="update_time" property="updateTime"/>
<result column="status" property="status"/>
<result column="is_deleted" property="isDeleted"/>
<result column="tenant_id" property="tenantId"/>
<result column="tenant_name" property="tenantName"/>
<result column="domain" property="domain"/>
<result column="background_url" property="backgroundUrl"/>
<result column="linkman" property="linkman"/>
<result column="contact_number" property="contactNumber"/>
<result column="address" property="address"/>
<result column="account_number" property="accountNumber"/>
<result column="expire_time" property="expireTime"/>
</resultMap>

1
blade-service/blade-system/src/main/java/org/springblade/system/service/impl/TenantServiceImpl.java

@ -62,6 +62,7 @@ public class TenantServiceImpl extends BaseServiceImpl<TenantMapper, Tenant> imp
List<String> codes = tenants.stream().map(Tenant::getTenantId).collect(Collectors.toList());
String tenantId = getTenantId(codes);
tenant.setTenantId(tenantId);
tenant.setAccountNumber(-1);
// 新建租户对应的默认角色
Role role = new Role();
role.setTenantId(tenantId);

27
doc/sql/mysql/bladex-saber-mysql.sql

File diff suppressed because one or more lines are too long

25
doc/sql/mysql/bladex-sword-mysql.sql

File diff suppressed because one or more lines are too long

105
doc/sql/oracle/bladex-saber-oracle.sql

@ -11,7 +11,7 @@
Target Server Version : 110200
File Encoding : 65001
Date: 08/12/2019 10:05:00
Date: 02/01/2020 14:04:40
*/
@ -623,6 +623,32 @@ COMMENT ON TABLE "BLADE_MENU" IS '菜单表';
-- ----------------------------
-- Records of BLADE_MENU
-- ----------------------------
INSERT INTO "BLADE_MENU" VALUES ('1123598815738675310', '1123598815738675309', 'data_scope_setting', '权限配置', 'setting', NULL, 'setting', '1', '2', '2', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1123598815738675311', '1123598815738675307', 'api_scope', '接口权限', 'menu', '/authority/apiscope', 'iconfont icon-iconset0216', '3', '1', '0', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1123598815738675312', '1123598815738675311', 'api_scope_setting', '权限配置', 'setting', NULL, 'setting', '1', '2', '2', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1123598815738675313', '1123598815738675208', 'topmenu_add', '新增', 'add', '/system/topmenu/add', 'plus', '1', '2', '1', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1123598815738675314', '1123598815738675208', 'topmenu_edit', '修改', 'edit', '/system/topmenu/edit', 'form', '2', '2', '2', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1123598815738675315', '1123598815738675208', 'topmenu_delete', '删除', 'delete', '/api/blade-system/topmenu/remove', 'delete', '3', '2', '3', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1123598815738675316', '1123598815738675208', 'topmenu_view', '查看', 'view', '/system/topmenu/view', 'file-text', '4', '2', '2', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1123598815738675317', '1123598815738675208', 'topmenu_setting', '菜单配置', 'setting', NULL, 'setting', '5', '2', '1', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1161272593873321991', '1123598815738675217', 'datasource', '数据源管理', 'menu', '/tool/datasource', 'iconfont icon-caidanguanli', '2', '1', '0', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1161272593873321992', '1161272593873321991', 'datasource_add', '新增', 'add', '/tool/datasource/add', 'plus', '1', '2', '1', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1161272593873321993', '1161272593873321991', 'datasource_edit', '修改', 'edit', '/tool/datasource/edit', 'form', '2', '2', '2', '2', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1161272593873321994', '1161272593873321991', 'datasource_delete', '删除', 'delete', '/api/blade-develop/datasource/remove', 'delete', '3', '2', '3', '3', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1161272593873321995', '1161272593873321991', 'datasource_view', '查看', 'view', '/tool/datasource/view', 'file-text', '4', '2', '2', '2', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1164733121140551682', '1123598815738675217', 'form', '表单设计', 'form', 'https://form.avuejs.com/', 'iconfont iconicon_compile', '3', '1', '0', '2', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1164733349637844993', '1123598815738675217', 'crud', '表格设计', 'crud', 'https://crud.avuejs.com/', 'iconfont iconicon_work', '4', '1', '0', '2', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1164733369658963251', '1123598815738675210', 'elk', 'ELK监控', 'menu', 'http://localhost:5601/', 'iconfont iconicon_cspace', '3', '1', '0', '2', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1164733369658963252', '1123598815738675210', 'zipkin', 'Zipkin监控', 'menu', 'http://localhost:9411/', 'iconfont iconicon_task', '4', '1', '0', '2', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1164733369658963253', '1123598815738675210', 'turbine', 'Turbine监控', 'menu', 'http://localhost:7003/hystrix', 'iconfont iconicon_subordinate', '5', '1', '0', '2', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1164733369658963254', '1123598815738675210', 'sentinel', 'Sentinel管理', 'menu', 'http://localhost:8858', 'iconfont iconicon_safety', '6', '1', '0', '2', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1164733369658963255', '1123598815738675210', 'es', 'Elasticsearch管理', 'menu', 'http://localhost:9100/', 'iconfont iconfont iconicon_search', '7', '1', '0', '2', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1164733379658963251', '1123598815738675203', 'dictbiz', '业务字典', 'menu', '/system/dictbiz', 'iconfont iconicon_study', '3', '1', '0', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1164733379658963252', '1164733379658963251', 'dictbiz_add', '新增', 'add', '/system/dictbiz/add', 'plus', '1', '2', '1', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1164733379658963253', '1164733379658963251', 'dictbiz_edit', '修改', 'edit', '/system/dictbiz/edit', 'form', '2', '2', '2', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1164733379658963254', '1164733379658963251', 'dictbiz_delete', '删除', 'delete', '/api/blade-system/dict-biz/remove', 'delete', '3', '2', '3', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1164733379658963255', '1164733379658963251', 'dictbiz_view', '查看', 'view', '/system/dictbiz/view', 'file-text', '4', '2', '2', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1164733389658963251', '1123598815738675298', 'xxljob', '任务调度', 'menu', 'http://localhost:7009/xxl-job-admin', 'iconfont iconicon_cspace', '2', '1', '0', '2', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1123598815738675201', '0', 'desk', '工作台', 'menu', '/desk', 'iconfont iconicon_airplay', '1', '1', '0', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1123598815738675202', '1123598815738675201', 'notice', '通知公告', 'menu', '/desk/notice', 'iconfont iconicon_sms', '1', '1', '0', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1123598815738675203', '0', 'system', '系统管理', 'menu', '/system', 'iconfont iconicon_setting', '99', '1', '0', '1', NULL, '0');
@ -730,31 +756,6 @@ INSERT INTO "BLADE_MENU" VALUES ('1123598815738675305', '1123598815738675299', '
INSERT INTO "BLADE_MENU" VALUES ('1123598815738675307', '0', 'authority', '权限管理', 'menu', '/authority', 'iconfont icon-bofangqi-suoping', '98', '1', '0', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1123598815738675308', '1123598815738675307', 'role', '角色管理', 'menu', '/authority/role', 'iconfont iconicon_boss', '1', '1', '0', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1123598815738675309', '1123598815738675307', 'data_scope', '数据权限', 'menu', '/authority/datascope', 'iconfont icon-shujuzhanshi2', '2', '1', '0', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1123598815738675310', '1123598815738675309', 'data_scope_setting', '权限配置', 'setting', NULL, 'setting', '1', '2', '2', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1123598815738675311', '1123598815738675307', 'api_scope', '接口权限', 'menu', '/authority/apiscope', 'iconfont icon-iconset0216', '3', '1', '0', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1123598815738675312', '1123598815738675311', 'api_scope_setting', '权限配置', 'setting', NULL, 'setting', '1', '2', '2', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1123598815738675313', '1123598815738675208', 'topmenu_add', '新增', 'add', '/system/topmenu/add', 'plus', '1', '2', '1', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1123598815738675314', '1123598815738675208', 'topmenu_edit', '修改', 'edit', '/system/topmenu/edit', 'form', '2', '2', '2', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1123598815738675315', '1123598815738675208', 'topmenu_delete', '删除', 'delete', '/api/blade-system/topmenu/remove', 'delete', '3', '2', '3', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1123598815738675316', '1123598815738675208', 'topmenu_view', '查看', 'view', '/system/topmenu/view', 'file-text', '4', '2', '2', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1123598815738675317', '1123598815738675208', 'topmenu_setting', '菜单配置', 'setting', NULL, 'setting', '5', '2', '1', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1161272593873321991', '1123598815738675217', 'datasource', '数据源管理', 'menu', '/tool/datasource', 'iconfont icon-caidanguanli', '2', '1', '0', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1161272593873321992', '1161272593873321991', 'datasource_add', '新增', 'add', '/tool/datasource/add', 'plus', '1', '2', '1', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1161272593873321993', '1161272593873321991', 'datasource_edit', '修改', 'edit', '/tool/datasource/edit', 'form', '2', '2', '2', '2', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1161272593873321994', '1161272593873321991', 'datasource_delete', '删除', 'delete', '/api/blade-develop/datasource/remove', 'delete', '3', '2', '3', '3', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1161272593873321995', '1161272593873321991', 'datasource_view', '查看', 'view', '/tool/datasource/view', 'file-text', '4', '2', '2', '2', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1164733121140551682', '1123598815738675217', 'form', '表单设计', 'form', 'https://form.avuejs.com/', 'iconfont iconicon_compile', '3', '1', '0', '2', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1164733349637844993', '1123598815738675217', 'crud', '表格设计', 'crud', 'https://crud.avuejs.com/', 'iconfont iconicon_work', '4', '1', '0', '2', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1164733369658963251', '1123598815738675210', 'elk', 'ELK监控', 'menu', 'http://localhost:5601/', 'iconfont iconicon_cspace', '3', '1', '0', '2', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1164733369658963252', '1123598815738675210', 'zipkin', 'Zipkin监控', 'menu', 'http://localhost:9411/', 'iconfont iconicon_task', '4', '1', '0', '2', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1164733369658963253', '1123598815738675210', 'turbine', 'Turbine监控', 'menu', 'http://localhost:7003/hystrix', 'iconfont iconicon_subordinate', '5', '1', '0', '2', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1164733369658963254', '1123598815738675210', 'sentinel', 'Sentinel管理', 'menu', 'http://localhost:8858', 'iconfont iconicon_safety', '6', '1', '0', '2', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1164733369658963255', '1123598815738675210', 'es', 'Elasticsearch管理', 'menu', 'http://localhost:9100/', 'iconfont iconfont iconicon_search', '7', '1', '0', '2', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1164733379658963251', '1123598815738675203', 'dictbiz', '业务字典', 'menu', '/system/dictbiz', 'iconfont iconicon_study', '3', '1', '0', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1164733379658963252', '1164733379658963251', 'dictbiz_add', '新增', 'add', '/system/dictbiz/add', 'plus', '1', '2', '1', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1164733379658963253', '1164733379658963251', 'dictbiz_edit', '修改', 'edit', '/system/dictbiz/edit', 'form', '2', '2', '2', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1164733379658963254', '1164733379658963251', 'dictbiz_delete', '删除', 'delete', '/api/blade-system/dict-biz/remove', 'delete', '3', '2', '3', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1164733379658963255', '1164733379658963251', 'dictbiz_view', '查看', 'view', '/system/dictbiz/view', 'file-text', '4', '2', '2', '1', NULL, '0');
COMMIT;
-- ----------------------------
@ -1295,6 +1296,7 @@ INSERT INTO "BLADE_ROLE_MENU" VALUES ('1161272793873322992', '116473337658963252
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1161272793873322993', '1164733379658963253', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1161272793873322994', '1164733379658963254', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1161272793873322995', '1164733379658963255', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1161272893873322991', '1164733389658963251', '1123598816738675201');
COMMIT;
-- ----------------------------
@ -1447,9 +1449,13 @@ CREATE TABLE "BLADE_TENANT" (
"ID" NUMBER(20) NOT NULL ,
"TENANT_ID" NVARCHAR2(12) ,
"TENANT_NAME" NVARCHAR2(50) NOT NULL ,
"DOMAIN" VARCHAR2(255 BYTE) ,
"BACKGROUND_URL" VARCHAR2(1000 BYTE) ,
"LINKMAN" NVARCHAR2(20) ,
"CONTACT_NUMBER" NVARCHAR2(20) ,
"ADDRESS" NVARCHAR2(255) ,
"ACCOUNT_NUMBER" NUMBER DEFAULT -1 ,
"EXPIRE_TIME" DATE ,
"CREATE_USER" NUMBER(20) ,
"CREATE_DEPT" NUMBER(20) ,
"CREATE_TIME" DATE ,
@ -1477,9 +1483,13 @@ DISABLE ROW MOVEMENT
COMMENT ON COLUMN "BLADE_TENANT"."ID" IS '主键';
COMMENT ON COLUMN "BLADE_TENANT"."TENANT_ID" IS '租户ID';
COMMENT ON COLUMN "BLADE_TENANT"."TENANT_NAME" IS '租户名称';
COMMENT ON COLUMN "BLADE_TENANT"."DOMAIN" IS '域名地址';
COMMENT ON COLUMN "BLADE_TENANT"."BACKGROUND_URL" IS '系统背景';
COMMENT ON COLUMN "BLADE_TENANT"."LINKMAN" IS '联系人';
COMMENT ON COLUMN "BLADE_TENANT"."CONTACT_NUMBER" IS '联系电话';
COMMENT ON COLUMN "BLADE_TENANT"."ADDRESS" IS '联系地址';
COMMENT ON COLUMN "BLADE_TENANT"."ACCOUNT_NUMBER" IS '账号额度';
COMMENT ON COLUMN "BLADE_TENANT"."EXPIRE_TIME" IS '过期时间';
COMMENT ON COLUMN "BLADE_TENANT"."CREATE_USER" IS '创建人';
COMMENT ON COLUMN "BLADE_TENANT"."CREATE_DEPT" IS '创建部门';
COMMENT ON COLUMN "BLADE_TENANT"."CREATE_TIME" IS '创建时间';
@ -1492,7 +1502,7 @@ COMMENT ON TABLE "BLADE_TENANT" IS '租户表';
-- ----------------------------
-- Records of BLADE_TENANT
-- ----------------------------
INSERT INTO "BLADE_TENANT" VALUES ('1123598820738675201', '000000', '管理组', 'admin', '666666', '管理组', '1123598821738675201', '1123598813738675201', TO_DATE('2019-01-01 00:00:39', 'SYYYY-MM-DD HH24:MI:SS'), '1123598821738675201', TO_DATE('2019-01-01 00:00:39', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0');
INSERT INTO "BLADE_TENANT" VALUES ('1123598820738675201', '000000', '管理组', NULL, NULL, 'admin', '666666', '管理组', '-1', NULL, '1123598821738675201', '1123598813738675201', TO_DATE('2019-01-01 00:00:39', 'SYYYY-MM-DD HH24:MI:SS'), '1123598821738675201', TO_DATE('2019-01-01 00:00:39', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0');
COMMIT;
-- ----------------------------
@ -1680,10 +1690,10 @@ COMMENT ON TABLE "BLADE_USER_DEPT" IS '用户部门表';
-- ----------------------------
-- Records of BLADE_USER_DEPT
-- ----------------------------
INSERT INTO "BLADE_USER_DEPT" VALUES (1203503640757788674, 1123598821738675201, 1123598813738675201);
INSERT INTO "BLADE_USER_DEPT" VALUES (1203503653323923458, 1123598821738675202, 1123598813738675202);
INSERT INTO "BLADE_USER_DEPT" VALUES (1203503663402835969, 1123598821738675203, 1123598813738675202);
INSERT INTO "BLADE_USER_DEPT" VALUES (1203503672911323137, 1123598821738675204, 1123598813738675202);
INSERT INTO "BLADE_USER_DEPT" VALUES ('1203503640757788674', '1123598821738675201', '1123598813738675201');
INSERT INTO "BLADE_USER_DEPT" VALUES ('1203503653323923458', '1123598821738675202', '1123598813738675202');
INSERT INTO "BLADE_USER_DEPT" VALUES ('1203503663402835969', '1123598821738675203', '1123598813738675202');
INSERT INTO "BLADE_USER_DEPT" VALUES ('1203503672911323137', '1123598821738675204', '1123598813738675202');
COMMIT;
-- ----------------------------
@ -1730,6 +1740,15 @@ ALTER TABLE "BLADE_CLIENT" ADD CONSTRAINT "SYS_C0019477" CHECK ("ACCESS_TOKEN_VA
ALTER TABLE "BLADE_CLIENT" ADD CONSTRAINT "SYS_C0019478" CHECK ("REFRESH_TOKEN_VALIDITY" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_CLIENT" ADD CONSTRAINT "SYS_C0019479" CHECK ("STATUS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_CLIENT" ADD CONSTRAINT "SYS_C0019480" CHECK ("IS_DELETED" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_CLIENT" ADD CONSTRAINT "SYS_C0020246" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_CLIENT" ADD CONSTRAINT "SYS_C0020247" CHECK ("CLIENT_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_CLIENT" ADD CONSTRAINT "SYS_C0020248" CHECK ("CLIENT_SECRET" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_CLIENT" ADD CONSTRAINT "SYS_C0020249" CHECK ("SCOPE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_CLIENT" ADD CONSTRAINT "SYS_C0020250" CHECK ("AUTHORIZED_GRANT_TYPES" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_CLIENT" ADD CONSTRAINT "SYS_C0020251" CHECK ("ACCESS_TOKEN_VALIDITY" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_CLIENT" ADD CONSTRAINT "SYS_C0020252" CHECK ("REFRESH_TOKEN_VALIDITY" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_CLIENT" ADD CONSTRAINT "SYS_C0020253" CHECK ("STATUS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_CLIENT" ADD CONSTRAINT "SYS_C0020254" CHECK ("IS_DELETED" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_CODE
@ -1743,6 +1762,7 @@ ALTER TABLE "BLADE_CODE" ADD CONSTRAINT "SYS_C0012736" CHECK ("ID" IS NOT NULL)
ALTER TABLE "BLADE_CODE" ADD CONSTRAINT "SYS_C0017048" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_CODE" ADD CONSTRAINT "SYS_C0019190" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_CODE" ADD CONSTRAINT "SYS_C0019481" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_CODE" ADD CONSTRAINT "SYS_C0020255" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_DATASOURCE
@ -1755,6 +1775,7 @@ ALTER TABLE "BLADE_DATASOURCE" ADD CONSTRAINT "SYS_C0017121" PRIMARY KEY ("ID");
ALTER TABLE "BLADE_DATASOURCE" ADD CONSTRAINT "SYS_C0017120" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_DATASOURCE" ADD CONSTRAINT "SYS_C0019191" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_DATASOURCE" ADD CONSTRAINT "SYS_C0019482" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_DATASOURCE" ADD CONSTRAINT "SYS_C0020256" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_DEPT
@ -1768,6 +1789,7 @@ ALTER TABLE "BLADE_DEPT" ADD CONSTRAINT "SYS_C0012737" CHECK ("ID" IS NOT NULL)
ALTER TABLE "BLADE_DEPT" ADD CONSTRAINT "SYS_C0017049" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_DEPT" ADD CONSTRAINT "SYS_C0019192" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_DEPT" ADD CONSTRAINT "SYS_C0019483" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_DEPT" ADD CONSTRAINT "SYS_C0020257" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_DICT
@ -1781,6 +1803,7 @@ ALTER TABLE "BLADE_DICT" ADD CONSTRAINT "SYS_C0012738" CHECK ("ID" IS NOT NULL)
ALTER TABLE "BLADE_DICT" ADD CONSTRAINT "SYS_C0017050" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_DICT" ADD CONSTRAINT "SYS_C0019193" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_DICT" ADD CONSTRAINT "SYS_C0019484" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_DICT" ADD CONSTRAINT "SYS_C0020258" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_DICT_BIZ
@ -1792,6 +1815,7 @@ ALTER TABLE "BLADE_DICT_BIZ" ADD CONSTRAINT "SYS_C0019296" PRIMARY KEY ("ID");
-- ----------------------------
ALTER TABLE "BLADE_DICT_BIZ" ADD CONSTRAINT "SYS_C0019295" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_DICT_BIZ" ADD CONSTRAINT "SYS_C0019485" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_DICT_BIZ" ADD CONSTRAINT "SYS_C0020259" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_LOG_API
@ -1805,6 +1829,7 @@ ALTER TABLE "BLADE_LOG_API" ADD CONSTRAINT "SYS_C0012739" CHECK ("ID" IS NOT NUL
ALTER TABLE "BLADE_LOG_API" ADD CONSTRAINT "SYS_C0017051" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_LOG_API" ADD CONSTRAINT "SYS_C0019194" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_LOG_API" ADD CONSTRAINT "SYS_C0019486" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_LOG_API" ADD CONSTRAINT "SYS_C0020260" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_LOG_ERROR
@ -1818,6 +1843,7 @@ ALTER TABLE "BLADE_LOG_ERROR" ADD CONSTRAINT "SYS_C0012740" CHECK ("ID" IS NOT N
ALTER TABLE "BLADE_LOG_ERROR" ADD CONSTRAINT "SYS_C0017052" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_LOG_ERROR" ADD CONSTRAINT "SYS_C0019195" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_LOG_ERROR" ADD CONSTRAINT "SYS_C0019487" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_LOG_ERROR" ADD CONSTRAINT "SYS_C0020261" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_LOG_USUAL
@ -1831,6 +1857,7 @@ ALTER TABLE "BLADE_LOG_USUAL" ADD CONSTRAINT "SYS_C0012741" CHECK ("ID" IS NOT N
ALTER TABLE "BLADE_LOG_USUAL" ADD CONSTRAINT "SYS_C0017053" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_LOG_USUAL" ADD CONSTRAINT "SYS_C0019196" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_LOG_USUAL" ADD CONSTRAINT "SYS_C0019488" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_LOG_USUAL" ADD CONSTRAINT "SYS_C0020262" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_MENU
@ -1844,6 +1871,7 @@ ALTER TABLE "BLADE_MENU" ADD CONSTRAINT "SYS_C0012742" CHECK ("ID" IS NOT NULL)
ALTER TABLE "BLADE_MENU" ADD CONSTRAINT "SYS_C0017054" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_MENU" ADD CONSTRAINT "SYS_C0019197" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_MENU" ADD CONSTRAINT "SYS_C0019489" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_MENU" ADD CONSTRAINT "SYS_C0020263" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_NOTICE
@ -1857,6 +1885,7 @@ ALTER TABLE "BLADE_NOTICE" ADD CONSTRAINT "SYS_C0012743" CHECK ("ID" IS NOT NULL
ALTER TABLE "BLADE_NOTICE" ADD CONSTRAINT "SYS_C0017055" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_NOTICE" ADD CONSTRAINT "SYS_C0019198" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_NOTICE" ADD CONSTRAINT "SYS_C0019490" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_NOTICE" ADD CONSTRAINT "SYS_C0020264" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_OSS
@ -1870,6 +1899,7 @@ ALTER TABLE "BLADE_OSS" ADD CONSTRAINT "SYS_C0012744" CHECK ("ID" IS NOT NULL) N
ALTER TABLE "BLADE_OSS" ADD CONSTRAINT "SYS_C0017056" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_OSS" ADD CONSTRAINT "SYS_C0019199" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_OSS" ADD CONSTRAINT "SYS_C0019491" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_OSS" ADD CONSTRAINT "SYS_C0020265" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_PARAM
@ -1883,6 +1913,7 @@ ALTER TABLE "BLADE_PARAM" ADD CONSTRAINT "SYS_C0012745" CHECK ("ID" IS NOT NULL)
ALTER TABLE "BLADE_PARAM" ADD CONSTRAINT "SYS_C0017057" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_PARAM" ADD CONSTRAINT "SYS_C0019200" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_PARAM" ADD CONSTRAINT "SYS_C0019492" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_PARAM" ADD CONSTRAINT "SYS_C0020266" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_PROCESS_LEAVE
@ -1896,6 +1927,7 @@ ALTER TABLE "BLADE_PROCESS_LEAVE" ADD CONSTRAINT "SYS_C0012746" CHECK ("ID" IS N
ALTER TABLE "BLADE_PROCESS_LEAVE" ADD CONSTRAINT "SYS_C0017058" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_PROCESS_LEAVE" ADD CONSTRAINT "SYS_C0019201" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_PROCESS_LEAVE" ADD CONSTRAINT "SYS_C0019493" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_PROCESS_LEAVE" ADD CONSTRAINT "SYS_C0020267" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_ROLE
@ -1909,6 +1941,7 @@ ALTER TABLE "BLADE_ROLE" ADD CONSTRAINT "SYS_C0012747" CHECK ("ID" IS NOT NULL)
ALTER TABLE "BLADE_ROLE" ADD CONSTRAINT "SYS_C0017059" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_ROLE" ADD CONSTRAINT "SYS_C0019202" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_ROLE" ADD CONSTRAINT "SYS_C0019494" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_ROLE" ADD CONSTRAINT "SYS_C0020268" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_ROLE_MENU
@ -1922,6 +1955,7 @@ ALTER TABLE "BLADE_ROLE_MENU" ADD CONSTRAINT "SYS_C0012748" CHECK ("ID" IS NOT N
ALTER TABLE "BLADE_ROLE_MENU" ADD CONSTRAINT "SYS_C0017060" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_ROLE_MENU" ADD CONSTRAINT "SYS_C0019203" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_ROLE_MENU" ADD CONSTRAINT "SYS_C0019495" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_ROLE_MENU" ADD CONSTRAINT "SYS_C0020269" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_ROLE_SCOPE
@ -1935,6 +1969,7 @@ ALTER TABLE "BLADE_ROLE_SCOPE" ADD CONSTRAINT "SYS_C0012749" CHECK ("ID" IS NOT
ALTER TABLE "BLADE_ROLE_SCOPE" ADD CONSTRAINT "SYS_C0017061" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_ROLE_SCOPE" ADD CONSTRAINT "SYS_C0019204" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_ROLE_SCOPE" ADD CONSTRAINT "SYS_C0019496" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_ROLE_SCOPE" ADD CONSTRAINT "SYS_C0020270" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_SCOPE_API
@ -1948,6 +1983,7 @@ ALTER TABLE "BLADE_SCOPE_API" ADD CONSTRAINT "SYS_C0012750" CHECK ("ID" IS NOT N
ALTER TABLE "BLADE_SCOPE_API" ADD CONSTRAINT "SYS_C0017062" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_SCOPE_API" ADD CONSTRAINT "SYS_C0019205" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_SCOPE_API" ADD CONSTRAINT "SYS_C0019497" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_SCOPE_API" ADD CONSTRAINT "SYS_C0020271" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_SCOPE_DATA
@ -1961,6 +1997,7 @@ ALTER TABLE "BLADE_SCOPE_DATA" ADD CONSTRAINT "SYS_C0012751" CHECK ("ID" IS NOT
ALTER TABLE "BLADE_SCOPE_DATA" ADD CONSTRAINT "SYS_C0017063" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_SCOPE_DATA" ADD CONSTRAINT "SYS_C0019206" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_SCOPE_DATA" ADD CONSTRAINT "SYS_C0019498" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_SCOPE_DATA" ADD CONSTRAINT "SYS_C0020272" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_TENANT
@ -1978,6 +2015,8 @@ ALTER TABLE "BLADE_TENANT" ADD CONSTRAINT "SYS_C0019207" CHECK ("ID" IS NOT NULL
ALTER TABLE "BLADE_TENANT" ADD CONSTRAINT "SYS_C0019208" CHECK ("TENANT_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_TENANT" ADD CONSTRAINT "SYS_C0019499" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_TENANT" ADD CONSTRAINT "SYS_C0019500" CHECK ("TENANT_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_TENANT" ADD CONSTRAINT "SYS_C0020273" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_TENANT" ADD CONSTRAINT "SYS_C0020274" CHECK ("TENANT_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_TOP_MENU
@ -1991,6 +2030,7 @@ ALTER TABLE "BLADE_TOP_MENU" ADD CONSTRAINT "SYS_C0012754" CHECK ("ID" IS NOT NU
ALTER TABLE "BLADE_TOP_MENU" ADD CONSTRAINT "SYS_C0017066" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_TOP_MENU" ADD CONSTRAINT "SYS_C0019209" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_TOP_MENU" ADD CONSTRAINT "SYS_C0019501" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_TOP_MENU" ADD CONSTRAINT "SYS_C0020275" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_TOP_MENU_SETTING
@ -2004,6 +2044,7 @@ ALTER TABLE "BLADE_TOP_MENU_SETTING" ADD CONSTRAINT "SYS_C0012755" CHECK ("ID" I
ALTER TABLE "BLADE_TOP_MENU_SETTING" ADD CONSTRAINT "SYS_C0017067" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_TOP_MENU_SETTING" ADD CONSTRAINT "SYS_C0019210" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_TOP_MENU_SETTING" ADD CONSTRAINT "SYS_C0019502" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_TOP_MENU_SETTING" ADD CONSTRAINT "SYS_C0020276" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_USER
@ -2017,6 +2058,7 @@ ALTER TABLE "BLADE_USER" ADD CONSTRAINT "SYS_C0012756" CHECK ("ID" IS NOT NULL)
ALTER TABLE "BLADE_USER" ADD CONSTRAINT "SYS_C0017068" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_USER" ADD CONSTRAINT "SYS_C0019211" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_USER" ADD CONSTRAINT "SYS_C0019503" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_USER" ADD CONSTRAINT "SYS_C0020277" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_USER_DEPT
@ -2027,3 +2069,4 @@ ALTER TABLE "BLADE_USER_DEPT" ADD CONSTRAINT "SYS_C0019621" PRIMARY KEY ("ID");
-- Checks structure for table BLADE_USER_DEPT
-- ----------------------------
ALTER TABLE "BLADE_USER_DEPT" ADD CONSTRAINT "SYS_C0019620" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_USER_DEPT" ADD CONSTRAINT "SYS_C0020278" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

107
doc/sql/oracle/bladex-sword-oracle.sql

@ -11,7 +11,7 @@
Target Server Version : 110200
File Encoding : 65001
Date: 08/12/2019 10:09:01
Date: 02/01/2020 14:09:24
*/
@ -682,6 +682,18 @@ INSERT INTO "BLADE_MENU" VALUES ('1123598815738675256', '1123598815738675203', '
INSERT INTO "BLADE_MENU" VALUES ('1123598815738675257', '1123598815738675256', 'tenant_add', '新增', 'add', '/system/tenant/add', 'plus', '1', '2', '1', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1123598815738675258', '1123598815738675256', 'tenant_edit', '修改', 'edit', '/system/tenant/edit', 'form', '2', '2', '2', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1123598815738675259', '1123598815738675256', 'tenant_delete', '删除', 'delete', '/api/blade-system/tenant/remove', 'delete', '3', '2', '3', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1161272593873321995', '1161272593873321991', 'datasource_view', '查看', 'view', '/tool/datasource/view', 'file-text', '4', '2', '2', '2', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1164733369658963251', '1123598815738675210', 'elk', 'ELK监控', 'menu', 'http://localhost:5601/', NULL, '3', '1', '0', '2', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1164733369658963252', '1123598815738675210', 'zipkin', 'Zipkin监控', 'menu', 'http://localhost:9411/', NULL, '4', '1', '0', '2', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1164733369658963253', '1123598815738675210', 'turbine', 'Turbine监控', 'menu', 'http://localhost:7003/hystrix', NULL, '5', '1', '0', '2', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1164733369658963254', '1123598815738675210', 'sentinel', 'Sentinel管理', 'menu', 'http://localhost:8858', NULL, '6', '1', '0', '2', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1164733369658963255', '1123598815738675210', 'es', 'Elasticsearch管理', 'menu', 'http://localhost:9100/', NULL, '7', '1', '0', '2', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1164733379658963251', '1123598815738675203', 'dictbiz', '业务字典', 'menu', '/system/dictbiz', NULL, '3', '1', '0', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1164733379658963252', '1164733379658963251', 'dictbiz_add', '新增', 'add', '/system/dictbiz/add', 'plus', '1', '2', '1', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1164733379658963253', '1164733379658963251', 'dictbiz_edit', '修改', 'edit', '/system/dictbiz/edit', 'form', '2', '2', '2', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1164733379658963254', '1164733379658963251', 'dictbiz_delete', '删除', 'delete', '/api/blade-system/dict-biz/remove', 'delete', '3', '2', '3', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1164733379658963255', '1164733379658963251', 'dictbiz_view', '查看', 'view', '/system/dictbiz/view', 'file-text', '4', '2', '2', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1164733389658963251', '1123598815738675298', 'xxljob', '任务调度', 'menu', 'http://localhost:7009/xxl-job-admin', NULL, '2', '1', '0', '2', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1123598815738675260', '1123598815738675256', 'tenant_view', '查看', 'view', '/system/tenant/view', 'file-text', '4', '2', '2', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1123598815738675261', '1123598815738675203', 'client', '应用管理', 'menu', '/system/client', NULL, '8', '1', '0', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1123598815738675262', '1123598815738675261', 'client_add', '新增', 'add', '/system/client/add', 'plus', '1', '2', '1', '1', NULL, '0');
@ -742,17 +754,6 @@ INSERT INTO "BLADE_MENU" VALUES ('1161272593873321991', '1123598815738675217', '
INSERT INTO "BLADE_MENU" VALUES ('1161272593873321992', '1161272593873321991', 'datasource_add', '新增', 'add', '/tool/datasource/add', 'plus', '1', '2', '1', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1161272593873321993', '1161272593873321991', 'datasource_edit', '修改', 'edit', '/tool/datasource/edit', 'form', '2', '2', '2', '2', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1161272593873321994', '1161272593873321991', 'datasource_delete', '删除', 'delete', '/api/blade-develop/datasource/remove', 'delete', '3', '2', '3', '3', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1161272593873321995', '1161272593873321991', 'datasource_view', '查看', 'view', '/tool/datasource/view', 'file-text', '4', '2', '2', '2', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1164733369658963251', '1123598815738675210', 'elk', 'ELK监控', 'menu', 'http://localhost:5601/', NULL, '3', '1', '0', '2', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1164733369658963252', '1123598815738675210', 'zipkin', 'Zipkin监控', 'menu', 'http://localhost:9411/', NULL, '4', '1', '0', '2', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1164733369658963253', '1123598815738675210', 'turbine', 'Turbine监控', 'menu', 'http://localhost:7003/hystrix', NULL, '5', '1', '0', '2', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1164733369658963254', '1123598815738675210', 'sentinel', 'Sentinel管理', 'menu', 'http://localhost:8858', NULL, '6', '1', '0', '2', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1164733369658963255', '1123598815738675210', 'es', 'Elasticsearch管理', 'menu', 'http://localhost:9100/', NULL, '7', '1', '0', '2', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1164733379658963251', '1123598815738675203', 'dictbiz', '业务字典', 'menu', '/system/dictbiz', NULL, '3', '1', '0', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1164733379658963252', '1164733379658963251', 'dictbiz_add', '新增', 'add', '/system/dictbiz/add', 'plus', '1', '2', '1', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1164733379658963253', '1164733379658963251', 'dictbiz_edit', '修改', 'edit', '/system/dictbiz/edit', 'form', '2', '2', '2', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1164733379658963254', '1164733379658963251', 'dictbiz_delete', '删除', 'delete', '/api/blade-system/dict-biz/remove', 'delete', '3', '2', '3', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1164733379658963255', '1164733379658963251', 'dictbiz_view', '查看', 'view', '/system/dictbiz/view', 'file-text', '4', '2', '2', '1', NULL, '0');
COMMIT;
-- ----------------------------
@ -1293,6 +1294,7 @@ INSERT INTO "BLADE_ROLE_MENU" VALUES ('1161272793873322992', '116473337658963252
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1161272793873322993', '1164733379658963253', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1161272793873322994', '1164733379658963254', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1161272793873322995', '1164733379658963255', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1161272893873322991', '1164733389658963251', '1123598816738675201');
COMMIT;
-- ----------------------------
@ -1442,22 +1444,26 @@ COMMENT ON TABLE "BLADE_SCOPE_DATA" IS '数据权限表';
-- ----------------------------
-- DROP TABLE "BLADE_TENANT";
CREATE TABLE "BLADE_TENANT" (
"ID" NUMBER(20) NOT NULL ,
"TENANT_ID" NVARCHAR2(12) ,
"TENANT_NAME" NVARCHAR2(50) NOT NULL ,
"LINKMAN" NVARCHAR2(20) ,
"CONTACT_NUMBER" NVARCHAR2(20) ,
"ADDRESS" NVARCHAR2(255) ,
"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)
"ID" NUMBER(20) NOT NULL ,
"TENANT_ID" NVARCHAR2(12) ,
"TENANT_NAME" NVARCHAR2(50) NOT NULL ,
"DOMAIN" VARCHAR2(255 BYTE) ,
"BACKGROUND_URL" VARCHAR2(1000 BYTE) ,
"LINKMAN" NVARCHAR2(20) ,
"CONTACT_NUMBER" NVARCHAR2(20) ,
"ADDRESS" NVARCHAR2(255) ,
"ACCOUNT_NUMBER" NUMBER DEFAULT -1 ,
"EXPIRE_TIME" DATE ,
"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)
)
TABLESPACE "BLADEX"
LOGGING
TABLESPACE "BLADEX"
LOGGING
NOCOMPRESS
PCTFREE 10
INITRANS 1
@ -1475,9 +1481,13 @@ DISABLE ROW MOVEMENT
COMMENT ON COLUMN "BLADE_TENANT"."ID" IS '主键';
COMMENT ON COLUMN "BLADE_TENANT"."TENANT_ID" IS '租户ID';
COMMENT ON COLUMN "BLADE_TENANT"."TENANT_NAME" IS '租户名称';
COMMENT ON COLUMN "BLADE_TENANT"."DOMAIN" IS '域名地址';
COMMENT ON COLUMN "BLADE_TENANT"."BACKGROUND_URL" IS '系统背景';
COMMENT ON COLUMN "BLADE_TENANT"."LINKMAN" IS '联系人';
COMMENT ON COLUMN "BLADE_TENANT"."CONTACT_NUMBER" IS '联系电话';
COMMENT ON COLUMN "BLADE_TENANT"."ADDRESS" IS '联系地址';
COMMENT ON COLUMN "BLADE_TENANT"."ACCOUNT_NUMBER" IS '账号额度';
COMMENT ON COLUMN "BLADE_TENANT"."EXPIRE_TIME" IS '过期时间';
COMMENT ON COLUMN "BLADE_TENANT"."CREATE_USER" IS '创建人';
COMMENT ON COLUMN "BLADE_TENANT"."CREATE_DEPT" IS '创建部门';
COMMENT ON COLUMN "BLADE_TENANT"."CREATE_TIME" IS '创建时间';
@ -1490,7 +1500,7 @@ COMMENT ON TABLE "BLADE_TENANT" IS '租户表';
-- ----------------------------
-- Records of BLADE_TENANT
-- ----------------------------
INSERT INTO "BLADE_TENANT" VALUES ('1123598820738675201', '000000', '管理组', 'admin', '666666', '管理组', '1123598821738675201', '1123598813738675201', TO_DATE('2019-01-01 00:00:39', 'SYYYY-MM-DD HH24:MI:SS'), '1123598821738675201', TO_DATE('2019-01-01 00:00:39', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0');
INSERT INTO "BLADE_TENANT" VALUES ('1123598820738675201', '000000', '管理组', NULL, NULL, 'admin', '666666', '管理组', '-1', NULL, '1123598821738675201', '1123598813738675201', TO_DATE('2019-01-01 00:00:39', 'SYYYY-MM-DD HH24:MI:SS'), '1123598821738675201', TO_DATE('2019-01-01 00:00:39', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0');
COMMIT;
-- ----------------------------
@ -1678,10 +1688,10 @@ COMMENT ON TABLE "BLADE_USER_DEPT" IS '用户部门表';
-- ----------------------------
-- Records of BLADE_USER_DEPT
-- ----------------------------
INSERT INTO "BLADE_USER_DEPT" VALUES (1203503640757788674, 1123598821738675201, 1123598813738675201);
INSERT INTO "BLADE_USER_DEPT" VALUES (1203503653323923458, 1123598821738675202, 1123598813738675202);
INSERT INTO "BLADE_USER_DEPT" VALUES (1203503663402835969, 1123598821738675203, 1123598813738675202);
INSERT INTO "BLADE_USER_DEPT" VALUES (1203503672911323137, 1123598821738675204, 1123598813738675202);
INSERT INTO "BLADE_USER_DEPT" VALUES ('1203503640757788674', '1123598821738675201', '1123598813738675201');
INSERT INTO "BLADE_USER_DEPT" VALUES ('1203503653323923458', '1123598821738675202', '1123598813738675202');
INSERT INTO "BLADE_USER_DEPT" VALUES ('1203503663402835969', '1123598821738675203', '1123598813738675202');
INSERT INTO "BLADE_USER_DEPT" VALUES ('1203503672911323137', '1123598821738675204', '1123598813738675202');
COMMIT;
-- ----------------------------
@ -1728,6 +1738,15 @@ ALTER TABLE "BLADE_CLIENT" ADD CONSTRAINT "SYS_C0019627" CHECK ("ACCESS_TOKEN_VA
ALTER TABLE "BLADE_CLIENT" ADD CONSTRAINT "SYS_C0019628" CHECK ("REFRESH_TOKEN_VALIDITY" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_CLIENT" ADD CONSTRAINT "SYS_C0019629" CHECK ("STATUS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_CLIENT" ADD CONSTRAINT "SYS_C0019630" CHECK ("IS_DELETED" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_CLIENT" ADD CONSTRAINT "SYS_C0020612" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_CLIENT" ADD CONSTRAINT "SYS_C0020613" CHECK ("CLIENT_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_CLIENT" ADD CONSTRAINT "SYS_C0020614" CHECK ("CLIENT_SECRET" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_CLIENT" ADD CONSTRAINT "SYS_C0020615" CHECK ("SCOPE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_CLIENT" ADD CONSTRAINT "SYS_C0020616" CHECK ("AUTHORIZED_GRANT_TYPES" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_CLIENT" ADD CONSTRAINT "SYS_C0020617" CHECK ("ACCESS_TOKEN_VALIDITY" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_CLIENT" ADD CONSTRAINT "SYS_C0020618" CHECK ("REFRESH_TOKEN_VALIDITY" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_CLIENT" ADD CONSTRAINT "SYS_C0020619" CHECK ("STATUS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_CLIENT" ADD CONSTRAINT "SYS_C0020620" CHECK ("IS_DELETED" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_CODE
@ -1741,6 +1760,7 @@ ALTER TABLE "BLADE_CODE" ADD CONSTRAINT "SYS_C0012653" CHECK ("ID" IS NOT NULL)
ALTER TABLE "BLADE_CODE" ADD CONSTRAINT "SYS_C0017228" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_CODE" ADD CONSTRAINT "SYS_C0019306" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_CODE" ADD CONSTRAINT "SYS_C0019631" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_CODE" ADD CONSTRAINT "SYS_C0020621" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_DATASOURCE
@ -1753,6 +1773,7 @@ ALTER TABLE "BLADE_DATASOURCE" ADD CONSTRAINT "SYS_C0017301" PRIMARY KEY ("ID");
ALTER TABLE "BLADE_DATASOURCE" ADD CONSTRAINT "SYS_C0017300" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_DATASOURCE" ADD CONSTRAINT "SYS_C0019307" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_DATASOURCE" ADD CONSTRAINT "SYS_C0019632" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_DATASOURCE" ADD CONSTRAINT "SYS_C0020622" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_DEPT
@ -1766,6 +1787,7 @@ ALTER TABLE "BLADE_DEPT" ADD CONSTRAINT "SYS_C0012654" CHECK ("ID" IS NOT NULL)
ALTER TABLE "BLADE_DEPT" ADD CONSTRAINT "SYS_C0017229" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_DEPT" ADD CONSTRAINT "SYS_C0019308" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_DEPT" ADD CONSTRAINT "SYS_C0019633" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_DEPT" ADD CONSTRAINT "SYS_C0020623" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_DICT
@ -1779,6 +1801,7 @@ ALTER TABLE "BLADE_DICT" ADD CONSTRAINT "SYS_C0012655" CHECK ("ID" IS NOT NULL)
ALTER TABLE "BLADE_DICT" ADD CONSTRAINT "SYS_C0017230" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_DICT" ADD CONSTRAINT "SYS_C0019309" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_DICT" ADD CONSTRAINT "SYS_C0019634" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_DICT" ADD CONSTRAINT "SYS_C0020624" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_DICT_BIZ
@ -1790,6 +1813,7 @@ ALTER TABLE "BLADE_DICT_BIZ" ADD CONSTRAINT "SYS_C0019412" PRIMARY KEY ("ID");
-- ----------------------------
ALTER TABLE "BLADE_DICT_BIZ" ADD CONSTRAINT "SYS_C0019411" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_DICT_BIZ" ADD CONSTRAINT "SYS_C0019635" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_DICT_BIZ" ADD CONSTRAINT "SYS_C0020625" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_LOG_API
@ -1803,6 +1827,7 @@ ALTER TABLE "BLADE_LOG_API" ADD CONSTRAINT "SYS_C0012656" CHECK ("ID" IS NOT NUL
ALTER TABLE "BLADE_LOG_API" ADD CONSTRAINT "SYS_C0017231" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_LOG_API" ADD CONSTRAINT "SYS_C0019310" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_LOG_API" ADD CONSTRAINT "SYS_C0019636" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_LOG_API" ADD CONSTRAINT "SYS_C0020626" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_LOG_ERROR
@ -1816,6 +1841,7 @@ ALTER TABLE "BLADE_LOG_ERROR" ADD CONSTRAINT "SYS_C0012657" CHECK ("ID" IS NOT N
ALTER TABLE "BLADE_LOG_ERROR" ADD CONSTRAINT "SYS_C0017232" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_LOG_ERROR" ADD CONSTRAINT "SYS_C0019311" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_LOG_ERROR" ADD CONSTRAINT "SYS_C0019637" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_LOG_ERROR" ADD CONSTRAINT "SYS_C0020627" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_LOG_USUAL
@ -1829,6 +1855,7 @@ ALTER TABLE "BLADE_LOG_USUAL" ADD CONSTRAINT "SYS_C0012658" CHECK ("ID" IS NOT N
ALTER TABLE "BLADE_LOG_USUAL" ADD CONSTRAINT "SYS_C0017233" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_LOG_USUAL" ADD CONSTRAINT "SYS_C0019312" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_LOG_USUAL" ADD CONSTRAINT "SYS_C0019638" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_LOG_USUAL" ADD CONSTRAINT "SYS_C0020628" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_MENU
@ -1842,6 +1869,7 @@ ALTER TABLE "BLADE_MENU" ADD CONSTRAINT "SYS_C0012659" CHECK ("ID" IS NOT NULL)
ALTER TABLE "BLADE_MENU" ADD CONSTRAINT "SYS_C0017234" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_MENU" ADD CONSTRAINT "SYS_C0019313" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_MENU" ADD CONSTRAINT "SYS_C0019639" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_MENU" ADD CONSTRAINT "SYS_C0020629" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_NOTICE
@ -1855,6 +1883,7 @@ ALTER TABLE "BLADE_NOTICE" ADD CONSTRAINT "SYS_C0012660" CHECK ("ID" IS NOT NULL
ALTER TABLE "BLADE_NOTICE" ADD CONSTRAINT "SYS_C0017235" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_NOTICE" ADD CONSTRAINT "SYS_C0019314" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_NOTICE" ADD CONSTRAINT "SYS_C0019640" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_NOTICE" ADD CONSTRAINT "SYS_C0020630" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_OSS
@ -1868,6 +1897,7 @@ ALTER TABLE "BLADE_OSS" ADD CONSTRAINT "SYS_C0012661" CHECK ("ID" IS NOT NULL) N
ALTER TABLE "BLADE_OSS" ADD CONSTRAINT "SYS_C0017236" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_OSS" ADD CONSTRAINT "SYS_C0019315" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_OSS" ADD CONSTRAINT "SYS_C0019641" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_OSS" ADD CONSTRAINT "SYS_C0020631" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_PARAM
@ -1881,6 +1911,7 @@ ALTER TABLE "BLADE_PARAM" ADD CONSTRAINT "SYS_C0012662" CHECK ("ID" IS NOT NULL)
ALTER TABLE "BLADE_PARAM" ADD CONSTRAINT "SYS_C0017237" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_PARAM" ADD CONSTRAINT "SYS_C0019316" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_PARAM" ADD CONSTRAINT "SYS_C0019642" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_PARAM" ADD CONSTRAINT "SYS_C0020632" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_PROCESS_LEAVE
@ -1894,6 +1925,7 @@ ALTER TABLE "BLADE_PROCESS_LEAVE" ADD CONSTRAINT "SYS_C0012663" CHECK ("ID" IS N
ALTER TABLE "BLADE_PROCESS_LEAVE" ADD CONSTRAINT "SYS_C0017238" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_PROCESS_LEAVE" ADD CONSTRAINT "SYS_C0019317" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_PROCESS_LEAVE" ADD CONSTRAINT "SYS_C0019643" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_PROCESS_LEAVE" ADD CONSTRAINT "SYS_C0020633" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_ROLE
@ -1907,6 +1939,7 @@ ALTER TABLE "BLADE_ROLE" ADD CONSTRAINT "SYS_C0012664" CHECK ("ID" IS NOT NULL)
ALTER TABLE "BLADE_ROLE" ADD CONSTRAINT "SYS_C0017239" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_ROLE" ADD CONSTRAINT "SYS_C0019318" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_ROLE" ADD CONSTRAINT "SYS_C0019644" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_ROLE" ADD CONSTRAINT "SYS_C0020634" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_ROLE_MENU
@ -1920,6 +1953,7 @@ ALTER TABLE "BLADE_ROLE_MENU" ADD CONSTRAINT "SYS_C0012665" CHECK ("ID" IS NOT N
ALTER TABLE "BLADE_ROLE_MENU" ADD CONSTRAINT "SYS_C0017240" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_ROLE_MENU" ADD CONSTRAINT "SYS_C0019319" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_ROLE_MENU" ADD CONSTRAINT "SYS_C0019645" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_ROLE_MENU" ADD CONSTRAINT "SYS_C0020635" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_ROLE_SCOPE
@ -1933,6 +1967,7 @@ ALTER TABLE "BLADE_ROLE_SCOPE" ADD CONSTRAINT "SYS_C0012666" CHECK ("ID" IS NOT
ALTER TABLE "BLADE_ROLE_SCOPE" ADD CONSTRAINT "SYS_C0017241" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_ROLE_SCOPE" ADD CONSTRAINT "SYS_C0019320" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_ROLE_SCOPE" ADD CONSTRAINT "SYS_C0019646" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_ROLE_SCOPE" ADD CONSTRAINT "SYS_C0020636" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_SCOPE_API
@ -1946,6 +1981,7 @@ ALTER TABLE "BLADE_SCOPE_API" ADD CONSTRAINT "SYS_C0012667" CHECK ("ID" IS NOT N
ALTER TABLE "BLADE_SCOPE_API" ADD CONSTRAINT "SYS_C0017242" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_SCOPE_API" ADD CONSTRAINT "SYS_C0019321" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_SCOPE_API" ADD CONSTRAINT "SYS_C0019647" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_SCOPE_API" ADD CONSTRAINT "SYS_C0020637" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_SCOPE_DATA
@ -1959,6 +1995,7 @@ ALTER TABLE "BLADE_SCOPE_DATA" ADD CONSTRAINT "SYS_C0012668" CHECK ("ID" IS NOT
ALTER TABLE "BLADE_SCOPE_DATA" ADD CONSTRAINT "SYS_C0017243" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_SCOPE_DATA" ADD CONSTRAINT "SYS_C0019322" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_SCOPE_DATA" ADD CONSTRAINT "SYS_C0019648" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_SCOPE_DATA" ADD CONSTRAINT "SYS_C0020638" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_TENANT
@ -1976,6 +2013,8 @@ ALTER TABLE "BLADE_TENANT" ADD CONSTRAINT "SYS_C0019323" CHECK ("ID" IS NOT NULL
ALTER TABLE "BLADE_TENANT" ADD CONSTRAINT "SYS_C0019324" CHECK ("TENANT_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_TENANT" ADD CONSTRAINT "SYS_C0019649" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_TENANT" ADD CONSTRAINT "SYS_C0019650" CHECK ("TENANT_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_TENANT" ADD CONSTRAINT "SYS_C0020639" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_TENANT" ADD CONSTRAINT "SYS_C0020640" CHECK ("TENANT_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_TOP_MENU
@ -1989,6 +2028,7 @@ ALTER TABLE "BLADE_TOP_MENU" ADD CONSTRAINT "SYS_C0012671" CHECK ("ID" IS NOT NU
ALTER TABLE "BLADE_TOP_MENU" ADD CONSTRAINT "SYS_C0017246" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_TOP_MENU" ADD CONSTRAINT "SYS_C0019325" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_TOP_MENU" ADD CONSTRAINT "SYS_C0019651" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_TOP_MENU" ADD CONSTRAINT "SYS_C0020641" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_TOP_MENU_SETTING
@ -2002,6 +2042,7 @@ ALTER TABLE "BLADE_TOP_MENU_SETTING" ADD CONSTRAINT "SYS_C0012672" CHECK ("ID" I
ALTER TABLE "BLADE_TOP_MENU_SETTING" ADD CONSTRAINT "SYS_C0017247" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_TOP_MENU_SETTING" ADD CONSTRAINT "SYS_C0019326" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_TOP_MENU_SETTING" ADD CONSTRAINT "SYS_C0019652" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_TOP_MENU_SETTING" ADD CONSTRAINT "SYS_C0020642" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_USER
@ -2015,6 +2056,7 @@ ALTER TABLE "BLADE_USER" ADD CONSTRAINT "SYS_C0012673" CHECK ("ID" IS NOT NULL)
ALTER TABLE "BLADE_USER" ADD CONSTRAINT "SYS_C0017248" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_USER" ADD CONSTRAINT "SYS_C0019327" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_USER" ADD CONSTRAINT "SYS_C0019653" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_USER" ADD CONSTRAINT "SYS_C0020643" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_USER_DEPT
@ -2025,3 +2067,4 @@ ALTER TABLE "BLADE_USER_DEPT" ADD CONSTRAINT "SYS_C0019771" PRIMARY KEY ("ID");
-- Checks structure for table BLADE_USER_DEPT
-- ----------------------------
ALTER TABLE "BLADE_USER_DEPT" ADD CONSTRAINT "SYS_C0019770" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_USER_DEPT" ADD CONSTRAINT "SYS_C0020644" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

14
doc/sql/postgresql/bladex-saber-postgresql.sql

@ -12,7 +12,7 @@
Target Server Version : 110001
File Encoding : 65001
Date: 08/12/2019 10:12:34
Date: 02/01/2020 13:56:12
*/
@ -612,6 +612,7 @@ INSERT INTO "blade_menu" VALUES (1164733379658963252, 1164733379658963251, 'dict
INSERT INTO "blade_menu" VALUES (1164733379658963253, 1164733379658963251, 'dictbiz_edit', '修改', 'edit', '/system/dictbiz/edit', 'form', 2, 2, 2, 1, '', 0);
INSERT INTO "blade_menu" VALUES (1164733379658963254, 1164733379658963251, 'dictbiz_delete', '删除', 'delete', '/api/blade-system/dict-biz/remove', 'delete', 3, 2, 3, 1, '', 0);
INSERT INTO "blade_menu" VALUES (1164733379658963255, 1164733379658963251, 'dictbiz_view', '查看', 'view', '/system/dictbiz/view', 'file-text', 4, 2, 2, 1, '', 0);
INSERT INTO "blade_menu" VALUES (1164733389658963251, 1123598815738675298, 'xxljob', '任务调度', 'menu', 'http://localhost:7009/xxl-job-admin', 'iconfont iconicon_cspace', 2, 1, 0, 2, '', 0);
COMMIT;
-- ----------------------------
@ -1067,6 +1068,7 @@ INSERT INTO "blade_role_menu" VALUES (1161272793873322992, 116473337658963252, 1
INSERT INTO "blade_role_menu" VALUES (1161272793873322993, 1164733379658963253, 1123598816738675201);
INSERT INTO "blade_role_menu" VALUES (1161272793873322994, 1164733379658963254, 1123598816738675201);
INSERT INTO "blade_role_menu" VALUES (1161272793873322995, 1164733379658963255, 1123598816738675201);
INSERT INTO "blade_role_menu" VALUES (1161272893873322991, 1164733389658963251, 1123598816738675201);
COMMIT;
-- ----------------------------
@ -1174,9 +1176,13 @@ CREATE TABLE "blade_tenant" (
"id" int8 NOT NULL,
"tenant_id" varchar(12) COLLATE "pg_catalog"."default",
"tenant_name" varchar(50) COLLATE "pg_catalog"."default" NOT NULL,
"domain" varchar(255) COLLATE "pg_catalog"."default",
"background_url" varchar(1000) COLLATE "pg_catalog"."default",
"linkman" varchar(20) COLLATE "pg_catalog"."default",
"contact_number" varchar(20) COLLATE "pg_catalog"."default",
"address" varchar(255) COLLATE "pg_catalog"."default",
"account_number" int2 DEFAULT '-1'::integer,
"expire_time" timestamp(6),
"create_user" int8,
"create_dept" int8,
"create_time" timestamp(6),
@ -1189,9 +1195,13 @@ CREATE TABLE "blade_tenant" (
COMMENT ON COLUMN "blade_tenant"."id" IS '主键';
COMMENT ON COLUMN "blade_tenant"."tenant_id" IS '租户ID';
COMMENT ON COLUMN "blade_tenant"."tenant_name" IS '租户名称';
COMMENT ON COLUMN "blade_tenant"."domain" IS '域名地址';
COMMENT ON COLUMN "blade_tenant"."background_url" IS '系统背景';
COMMENT ON COLUMN "blade_tenant"."linkman" IS '联系人';
COMMENT ON COLUMN "blade_tenant"."contact_number" IS '联系电话';
COMMENT ON COLUMN "blade_tenant"."address" IS '联系地址';
COMMENT ON COLUMN "blade_tenant"."account_number" IS '账号额度';
COMMENT ON COLUMN "blade_tenant"."expire_time" IS '过期时间';
COMMENT ON COLUMN "blade_tenant"."create_user" IS '创建人';
COMMENT ON COLUMN "blade_tenant"."create_dept" IS '创建部门';
COMMENT ON COLUMN "blade_tenant"."create_time" IS '创建时间';
@ -1205,7 +1215,7 @@ COMMENT ON TABLE "blade_tenant" IS '租户表';
-- Records of blade_tenant
-- ----------------------------
BEGIN;
INSERT INTO "blade_tenant" VALUES (1123598820738675201, '000000', '管理组', 'admin', '666666', '管理组', 1123598821738675201, 1123598813738675201, '2019-01-01 00:00:39', 1123598821738675201, '2019-01-01 00:00:39', 1, 0);
INSERT INTO "blade_tenant" VALUES (1123598820738675201, '000000', '管理组', NULL, NULL, 'admin', '666666', '管理组', -1, NULL, 1123598821738675201, 1123598813738675201, '2019-01-01 00:00:39', 1123598821738675201, '2019-01-01 00:00:39', 1, 0);
COMMIT;
-- ----------------------------

40
doc/sql/postgresql/bladex-sword-postgresql.sql

@ -12,7 +12,7 @@
Target Server Version : 110001
File Encoding : 65001
Date: 08/12/2019 10:13:15
Date: 02/01/2020 13:56:57
*/
@ -610,6 +610,7 @@ INSERT INTO "blade_menu" VALUES (1164733379658963252, 1164733379658963251, 'dict
INSERT INTO "blade_menu" VALUES (1164733379658963253, 1164733379658963251, 'dictbiz_edit', '修改', 'edit', '/system/dictbiz/edit', 'form', 2, 2, 2, 1, '', 0);
INSERT INTO "blade_menu" VALUES (1164733379658963254, 1164733379658963251, 'dictbiz_delete', '删除', 'delete', '/api/blade-system/dict-biz/remove', 'delete', 3, 2, 3, 1, '', 0);
INSERT INTO "blade_menu" VALUES (1164733379658963255, 1164733379658963251, 'dictbiz_view', '查看', 'view', '/system/dictbiz/view', 'file-text', 4, 2, 2, 1, '', 0);
INSERT INTO "blade_menu" VALUES (1164733389658963251, 1123598815738675298, 'xxljob', '任务调度', 'menu', 'http://localhost:7009/xxl-job-admin', '', 2, 1, 0, 2, '', 0);
COMMIT;
-- ----------------------------
@ -1065,6 +1066,7 @@ INSERT INTO "blade_role_menu" VALUES (1161272793873322992, 116473337658963252, 1
INSERT INTO "blade_role_menu" VALUES (1161272793873322993, 1164733379658963253, 1123598816738675201);
INSERT INTO "blade_role_menu" VALUES (1161272793873322994, 1164733379658963254, 1123598816738675201);
INSERT INTO "blade_role_menu" VALUES (1161272793873322995, 1164733379658963255, 1123598816738675201);
INSERT INTO "blade_role_menu" VALUES (1161272893873322991, 1164733389658963251, 1123598816738675201);
COMMIT;
-- ----------------------------
@ -1169,27 +1171,35 @@ COMMENT ON TABLE "blade_scope_data" IS '数据权限表';
-- ----------------------------
DROP TABLE IF EXISTS "blade_tenant";
CREATE TABLE "blade_tenant" (
"id" int8 NOT NULL,
"tenant_id" varchar(12) COLLATE "pg_catalog"."default",
"tenant_name" varchar(50) COLLATE "pg_catalog"."default" NOT NULL,
"linkman" varchar(20) COLLATE "pg_catalog"."default",
"contact_number" varchar(20) COLLATE "pg_catalog"."default",
"address" varchar(255) COLLATE "pg_catalog"."default",
"create_user" int8,
"create_dept" int8,
"create_time" timestamp(6),
"update_user" int8,
"update_time" timestamp(6),
"status" int4,
"is_deleted" int4
"id" int8 NOT NULL,
"tenant_id" varchar(12) COLLATE "pg_catalog"."default",
"tenant_name" varchar(50) COLLATE "pg_catalog"."default" NOT NULL,
"domain" varchar(255) COLLATE "pg_catalog"."default",
"background_url" varchar(1000) COLLATE "pg_catalog"."default",
"linkman" varchar(20) COLLATE "pg_catalog"."default",
"contact_number" varchar(20) COLLATE "pg_catalog"."default",
"address" varchar(255) COLLATE "pg_catalog"."default",
"account_number" int2 DEFAULT '-1'::integer,
"expire_time" timestamp(6),
"create_user" int8,
"create_dept" int8,
"create_time" timestamp(6),
"update_user" int8,
"update_time" timestamp(6),
"status" int4,
"is_deleted" int4
)
;
COMMENT ON COLUMN "blade_tenant"."id" IS '主键';
COMMENT ON COLUMN "blade_tenant"."tenant_id" IS '租户ID';
COMMENT ON COLUMN "blade_tenant"."tenant_name" IS '租户名称';
COMMENT ON COLUMN "blade_tenant"."domain" IS '域名地址';
COMMENT ON COLUMN "blade_tenant"."background_url" IS '系统背景';
COMMENT ON COLUMN "blade_tenant"."linkman" IS '联系人';
COMMENT ON COLUMN "blade_tenant"."contact_number" IS '联系电话';
COMMENT ON COLUMN "blade_tenant"."address" IS '联系地址';
COMMENT ON COLUMN "blade_tenant"."account_number" IS '账号额度';
COMMENT ON COLUMN "blade_tenant"."expire_time" IS '过期时间';
COMMENT ON COLUMN "blade_tenant"."create_user" IS '创建人';
COMMENT ON COLUMN "blade_tenant"."create_dept" IS '创建部门';
COMMENT ON COLUMN "blade_tenant"."create_time" IS '创建时间';
@ -1203,7 +1213,7 @@ COMMENT ON TABLE "blade_tenant" IS '租户表';
-- Records of blade_tenant
-- ----------------------------
BEGIN;
INSERT INTO "blade_tenant" VALUES (1123598820738675201, '000000', '管理组', 'admin', '666666', '管理组', 1123598821738675201, 1123598813738675201, '2019-01-01 00:00:39', 1123598821738675201, '2019-01-01 00:00:39', 1, 0);
INSERT INTO "blade_tenant" VALUES (1123598820738675201, '000000', '管理组', NULL, NULL, 'admin', '666666', '管理组', -1, NULL, 1123598821738675201, 1123598813738675201, '2019-01-01 00:00:39', 1123598821738675201, '2019-01-01 00:00:39', 1, 0);
COMMIT;
-- ----------------------------

69
doc/sql/update/mysql-update-2.2.1~2.2.2.sql

@ -1,69 +0,0 @@
-- ----------------------------
-- 修改字典表字段类型
-- ----------------------------
ALTER TABLE `blade_dict`
MODIFY COLUMN `dict_key` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '字典值' AFTER `code`;
-- ----------------------------
-- 插入菜单数据
-- ----------------------------
INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
VALUES ('1164733379658963251', '1123598815738675203', 'dictbiz', '业务字典', 'menu', '/system/dictbiz', 'iconfont iconicon_study', 3, 1, 0, 1, '', 0);
INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
VALUES ('1164733379658963252', '1164733379658963251', 'dictbiz_add', '新增', 'add', '/system/dictbiz/add', 'plus', 1, 2, 1, 1, '', 0);
INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
VALUES ('1164733379658963253', '1164733379658963251', 'dictbiz_edit', '修改', 'edit', '/system/dictbiz/edit', 'form', 2, 2, 2, 1, '', 0);
INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
VALUES ('1164733379658963254', '1164733379658963251', 'dictbiz_delete', '删除', 'delete', '/api/blade-system/dict-biz/remove', 'delete', 3, 2, 3, 1, '', 0);
INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
VALUES ('1164733379658963255', '1164733379658963251', 'dictbiz_view', '查看', 'view', '/system/dictbiz/view', 'file-text', 4, 2, 2, 1, '', 0);
-- ----------------------------
-- 插入数据源角色权限数据
-- ----------------------------
INSERT INTO `blade_role_menu`(`id`,`menu_id`,`role_id`)
VALUES ('1161272793873322991', '1164733379658963251', '1123598816738675201');
INSERT INTO `blade_role_menu`(`id`,`menu_id`,`role_id`)
VALUES ('1161272793873322992', '116473337658963252', '1123598816738675201');
INSERT INTO `blade_role_menu`(`id`,`menu_id`,`role_id`)
VALUES ('1161272793873322993', '1164733379658963253', '1123598816738675201');
INSERT INTO `blade_role_menu`(`id`,`menu_id`,`role_id`)
VALUES ('1161272793873322994', '1164733379658963254', '1123598816738675201');
INSERT INTO `blade_role_menu`(`id`,`menu_id`,`role_id`)
VALUES ('1161272793873322995', '1164733379658963255', '1123598816738675201');
-- ----------------------------
-- 创建业务字典表
-- ----------------------------
CREATE TABLE `blade_dict_biz` (
`id` bigint(64) NOT NULL COMMENT '主键',
`tenant_id` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '租户ID',
`parent_id` bigint(64) NULL DEFAULT 0 COMMENT '父主键',
`code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '字典码',
`dict_key` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '字典值',
`dict_value` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '字典名称',
`sort` int(11) NULL DEFAULT NULL COMMENT '排序',
`remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '字典备注',
`is_sealed` int(2) NULL DEFAULT 0 COMMENT '是否已封存',
`is_deleted` int(2) NULL DEFAULT 0 COMMENT '是否已删除',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '业务字典表';
-- ----------------------------
-- 创建用户部门表
-- ----------------------------
CREATE TABLE `blade_user_dept` (
`id` bigint(64) NOT NULL COMMENT '主键',
`user_id` bigint(64) NULL DEFAULT 0 COMMENT '用户ID',
`dept_id` bigint(64) NULL DEFAULT 0 COMMENT '部门ID',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户部门表';
-- ----------------------------
-- 新增用户部门表数据
-- ----------------------------
INSERT INTO `blade_user_dept`(`id`, `user_id`, `dept_id`) VALUES (1203503640757788674, 1123598821738675201, 1123598813738675201);
INSERT INTO `blade_user_dept`(`id`, `user_id`, `dept_id`) VALUES (1203503653323923458, 1123598821738675202, 1123598813738675202);
INSERT INTO `blade_user_dept`(`id`, `user_id`, `dept_id`) VALUES (1203503663402835969, 1123598821738675203, 1123598813738675202);
INSERT INTO `blade_user_dept`(`id`, `user_id`, `dept_id`) VALUES (1203503672911323137, 1123598821738675204, 1123598813738675202);

20
doc/sql/update/mysql-update-2.2.2~2.3.0.sql

@ -0,0 +1,20 @@
-- ----------------------------
-- 增加租户表字段
-- ----------------------------
ALTER TABLE `blade_tenant`
ADD COLUMN `domain` varchar(255) NULL COMMENT '域名地址' AFTER `tenant_name`,
ADD COLUMN `background_url` varchar(1000) NULL COMMENT '系统背景' AFTER `domain`,
ADD COLUMN `account_number` int(0) NULL DEFAULT -1 COMMENT '账号额度' AFTER `address`,
ADD COLUMN `expire_time` datetime(0) NULL COMMENT '过期时间' AFTER `account_number`;
-- ----------------------------
-- 插入菜单数据
-- ----------------------------
INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
VALUES ('1164733389658963251', '1123598815738675298', 'xxljob', '任务调度', 'menu', 'http://localhost:7009/xxl-job-admin', 'iconfont iconicon_cspace', 2, 1, 0, 2, '', 0);
-- ----------------------------
-- 插入角色权限数据
-- ----------------------------
INSERT INTO `blade_role_menu`(`id`,`menu_id`,`role_id`)
VALUES ('1161272893873322991', '1164733389658963251', '1123598816738675201');

90
doc/sql/update/oracle-update-2.2.1~2.2.2.sql

@ -1,90 +0,0 @@
-- 添加临时列
alter table "BLADEX"."BLADE_DICT" add TMP_DICT_KEY NVARCHAR2(255);
-- 将目标字段中数据加入到临时列中
update "BLADEX"."BLADE_DICT" set TMP_DICT_KEY = DICT_KEY ;
-- 将目标字段数据清空
update "BLADEX"."BLADE_DICT" set DICT_KEY = null;
-- 更改目标字段类型
alter table "BLADEX"."BLADE_DICT" modify ( DICT_KEY NVARCHAR2(255));
-- 将临时列数据加回到目标字段中
update "BLADEX"."BLADE_DICT" set DICT_KEY = TMP_DICT_KEY;
-- 清除临时列
alter table "BLADEX"."BLADE_DICT" drop column TMP_DICT_KEY;
-- ----------------------------
-- 插入菜单数据
-- ----------------------------
INSERT INTO "BLADEX"."BLADE_MENU"("ID", "PARENT_ID", "CODE", "NAME", "ALIAS", "PATH", "SOURCE", "SORT", "CATEGORY", "ACTION", "IS_OPEN", "REMARK", "IS_DELETED")
VALUES ('1164733379658963251', '1123598815738675203', 'dictbiz', '业务字典', 'menu', '/system/dictbiz', 'iconfont iconicon_study', 3, 1, 0, 1, '', 0);
INSERT INTO "BLADEX"."BLADE_MENU"("ID", "PARENT_ID", "CODE", "NAME", "ALIAS", "PATH", "SOURCE", "SORT", "CATEGORY", "ACTION", "IS_OPEN", "REMARK", "IS_DELETED")
VALUES ('1164733379658963252', '1164733379658963251', 'dictbiz_add', '新增', 'add', '/system/dictbiz/add', 'plus', 1, 2, 1, 1, '', 0);
INSERT INTO "BLADEX"."BLADE_MENU"("ID", "PARENT_ID", "CODE", "NAME", "ALIAS", "PATH", "SOURCE", "SORT", "CATEGORY", "ACTION", "IS_OPEN", "REMARK", "IS_DELETED")
VALUES ('1164733379658963253', '1164733379658963251', 'dictbiz_edit', '修改', 'edit', '/system/dictbiz/edit', 'form', 2, 2, 2, 1, '', 0);
INSERT INTO "BLADEX"."BLADE_MENU"("ID", "PARENT_ID", "CODE", "NAME", "ALIAS", "PATH", "SOURCE", "SORT", "CATEGORY", "ACTION", "IS_OPEN", "REMARK", "IS_DELETED")
VALUES ('1164733379658963254', '1164733379658963251', 'dictbiz_delete', '删除', 'delete', '/api/blade-system/dict-biz/remove', 'delete', 3, 2, 3, 1, '', 0);
INSERT INTO "BLADEX"."BLADE_MENU"("ID", "PARENT_ID", "CODE", "NAME", "ALIAS", "PATH", "SOURCE", "SORT", "CATEGORY", "ACTION", "IS_OPEN", "REMARK", "IS_DELETED")
VALUES ('1164733379658963255', '1164733379658963251', 'dictbiz_view', '查看', 'view', '/system/dictbiz/view', 'file-text', 4, 2, 2, 1, '', 0);
-- ----------------------------
-- 插入数据源角色权限数据
-- ----------------------------
INSERT INTO "BLADEX"."BLADE_ROLE_MENU"(ID,MENU_ID,ROLE_ID)
VALUES ('1161272793873322991', '1164733379658963251', '1123598816738675201');
INSERT INTO "BLADEX"."BLADE_ROLE_MENU"(ID,MENU_ID,ROLE_ID)
VALUES ('1161272793873322992', '116473337658963252', '1123598816738675201');
INSERT INTO "BLADEX"."BLADE_ROLE_MENU"(ID,MENU_ID,ROLE_ID)
VALUES ('1161272793873322993', '1164733379658963253', '1123598816738675201');
INSERT INTO "BLADEX"."BLADE_ROLE_MENU"(ID,MENU_ID,ROLE_ID)
VALUES ('1161272793873322994', '1164733379658963254', '1123598816738675201');
INSERT INTO "BLADEX"."BLADE_ROLE_MENU"(ID,MENU_ID,ROLE_ID)
VALUES ('1161272793873322995', '1164733379658963255', '1123598816738675201');
-- ----------------------------
-- 创建业务字典表
-- ----------------------------
CREATE TABLE "BLADEX"."BLADE_DICT_BIZ" (
"ID" NUMBER(20) NOT NULL ,
"TENANT_ID" NVARCHAR2(12) ,
"PARENT_ID" NUMBER(20) ,
"CODE" NVARCHAR2(255) ,
"DICT_KEY" NVARCHAR2(255) ,
"DICT_VALUE" NVARCHAR2(255) ,
"SORT" NUMBER(11) ,
"REMARK" NVARCHAR2(255) ,
"IS_SEALED" NUMBER(11) ,
"IS_DELETED" NUMBER(11) ,
PRIMARY KEY ("ID")
);
COMMENT ON COLUMN "BLADEX"."BLADE_DICT_BIZ"."ID" IS '主键';
COMMENT ON COLUMN "BLADEX"."BLADE_DICT_BIZ"."TENANT_ID" IS '租户ID';
COMMENT ON COLUMN "BLADEX"."BLADE_DICT_BIZ"."PARENT_ID" IS '父主键';
COMMENT ON COLUMN "BLADEX"."BLADE_DICT_BIZ"."CODE" IS '字典码';
COMMENT ON COLUMN "BLADEX"."BLADE_DICT_BIZ"."DICT_KEY" IS '字典值';
COMMENT ON COLUMN "BLADEX"."BLADE_DICT_BIZ"."DICT_VALUE" IS '字典名称';
COMMENT ON COLUMN "BLADEX"."BLADE_DICT_BIZ"."SORT" IS '排序';
COMMENT ON COLUMN "BLADEX"."BLADE_DICT_BIZ"."REMARK" IS '字典备注';
COMMENT ON COLUMN "BLADEX"."BLADE_DICT_BIZ"."IS_SEALED" IS '是否已封存';
COMMENT ON COLUMN "BLADEX"."BLADE_DICT_BIZ"."IS_DELETED" IS '是否已删除';
COMMENT ON TABLE "BLADEX"."BLADE_DICT_BIZ" IS '数据源配置表';
-- ----------------------------
-- 创建用户部门表
-- ----------------------------
CREATE TABLE "BLADEX"."BLADE_USER_DEPT" (
"ID" NUMBER(20) NOT NULL ,
"USER_ID" NUMBER(20) ,
"DEPT_ID" NUMBER(20) ,
PRIMARY KEY ("ID")
);
COMMENT ON COLUMN "BLADEX"."BLADE_USER_DEPT"."ID" IS '主键';
COMMENT ON COLUMN "BLADEX"."BLADE_USER_DEPT"."USER_ID" IS '用户ID';
COMMENT ON COLUMN "BLADEX"."BLADE_USER_DEPT"."DEPT_ID" IS '部门ID';
COMMENT ON TABLE "BLADEX"."BLADE_USER_DEPT" IS '用户部门表';
-- ----------------------------
-- 新增用户部门表数据
-- ----------------------------
INSERT INTO "BLADEX"."BLADE_USER_DEPT" VALUES (1203503640757788674, 1123598821738675201, 1123598813738675201);
INSERT INTO "BLADEX"."BLADE_USER_DEPT" VALUES (1203503653323923458, 1123598821738675202, 1123598813738675202);
INSERT INTO "BLADEX"."BLADE_USER_DEPT" VALUES (1203503663402835969, 1123598821738675203, 1123598813738675202);
INSERT INTO "BLADEX"."BLADE_USER_DEPT" VALUES (1203503672911323137, 1123598821738675204, 1123598813738675202);

26
doc/sql/update/oracle-update-2.2.2~2.3.0.sql

@ -0,0 +1,26 @@
-- ----------------------------
-- 增加租户表字段
-- ----------------------------
ALTER TABLE "BLADEX"."BLADE_TENANT"
ADD ("DOMAIN" VARCHAR2(255) )
ADD ("BACKGROUND_URL" VARCHAR2(1000) )
ADD ("ACCOUNT_NUMBER" NUMBER DEFAULT -1 )
ADD ("EXPIRE_TIME" DATE );
COMMENT ON COLUMN "BLADEX"."BLADE_TENANT"."DOMAIN" IS '域名地址';
COMMENT ON COLUMN "BLADEX"."BLADE_TENANT"."BACKGROUND_URL" IS '系统背景';
COMMENT ON COLUMN "BLADEX"."BLADE_TENANT"."ACCOUNT_NUMBER" IS '账号额度';
COMMENT ON COLUMN "BLADEX"."BLADE_TENANT"."EXPIRE_TIME" IS '过期时间';
-- ----------------------------
-- 插入菜单数据
-- ----------------------------
INSERT INTO "BLADEX"."BLADE_MENU"("ID", "PARENT_ID", "CODE", "NAME", "ALIAS", "PATH", "SOURCE", "SORT", "CATEGORY", "ACTION", "IS_OPEN", "REMARK", "IS_DELETED")
VALUES ('1164733389658963251', '1123598815738675298', 'xxljob', '任务调度', 'menu', 'http://localhost:7009/xxl-job-admin', 'iconfont iconicon_cspace', 2, 1, 0, 2, '', 0);
-- ----------------------------
-- 插入角色权限数据
-- ----------------------------
INSERT INTO "BLADEX"."BLADE_ROLE_MENU"(ID,MENU_ID,ROLE_ID)
VALUES ('1161272893873322991', '1164733389658963251', '1123598816738675201');

81
doc/sql/update/postgresql-update-2.2.1~2.2.2.sql

@ -1,81 +0,0 @@
ALTER TABLE "blade_dict"
ALTER COLUMN "dict_key" TYPE varchar(255) USING "dict_key"::varchar(255);
-- ----------------------------
-- 插入菜单数据
-- ----------------------------
INSERT INTO "blade_menu"("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "remark", "is_deleted")
VALUES ('1164733379658963251', '1123598815738675203', 'dictbiz', '业务字典', 'menu', '/system/dictbiz', 'iconfont iconicon_study', 3, 1, 0, 1, '', 0);
INSERT INTO "blade_menu"("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "remark", "is_deleted")
VALUES ('1164733379658963252', '1164733379658963251', 'dictbiz_add', '新增', 'add', '/system/dictbiz/add', 'plus', 1, 2, 1, 1, '', 0);
INSERT INTO "blade_menu"("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "remark", "is_deleted")
VALUES ('1164733379658963253', '1164733379658963251', 'dictbiz_edit', '修改', 'edit', '/system/dictbiz/edit', 'form', 2, 2, 2, 1, '', 0);
INSERT INTO "blade_menu"("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "remark", "is_deleted")
VALUES ('1164733379658963254', '1164733379658963251', 'dictbiz_delete', '删除', 'delete', '/api/blade-system/dict-biz/remove', 'delete', 3, 2, 3, 1, '', 0);
INSERT INTO "blade_menu"("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "remark", "is_deleted")
VALUES ('1164733379658963255', '1164733379658963251', 'dictbiz_view', '查看', 'view', '/system/dictbiz/view', 'file-text', 4, 2, 2, 1, '', 0);
-- ----------------------------
-- 插入数据源角色权限数据
-- ----------------------------
INSERT INTO "blade_role_menu"("id","menu_id","role_id")
VALUES ('1161272793873322991', '1164733379658963251', '1123598816738675201');
INSERT INTO "blade_role_menu"("id","menu_id","role_id")
VALUES ('1161272793873322992', '116473337658963252', '1123598816738675201');
INSERT INTO "blade_role_menu"("id","menu_id","role_id")
VALUES ('1161272793873322993', '1164733379658963253', '1123598816738675201');
INSERT INTO "blade_role_menu"("id","menu_id","role_id")
VALUES ('1161272793873322994', '1164733379658963254', '1123598816738675201');
INSERT INTO "blade_role_menu"("id","menu_id","role_id")
VALUES ('1161272793873322995', '1164733379658963255', '1123598816738675201');
-- ----------------------------
-- 创建业务字典表
-- ----------------------------
CREATE TABLE "blade_dict_biz" (
"id" int8 NOT NULL,
"tenant_id" varchar(12) COLLATE "pg_catalog"."default",
"parent_id" int8,
"code" varchar(255) COLLATE "pg_catalog"."default",
"dict_key" varchar(255) COLLATE "pg_catalog"."default",
"dict_value" varchar(255) COLLATE "pg_catalog"."default",
"sort" int4,
"remark" varchar(255) COLLATE "pg_catalog"."default",
"is_sealed" int4,
"is_deleted" int4,
PRIMARY KEY ("id")
);
COMMENT ON COLUMN "blade_dict_biz"."id" IS '主键';
COMMENT ON COLUMN "blade_dict_biz"."tenant_id" IS '租户ID';
COMMENT ON COLUMN "blade_dict_biz"."parent_id" IS '父主键';
COMMENT ON COLUMN "blade_dict_biz"."code" IS '字典码';
COMMENT ON COLUMN "blade_dict_biz"."dict_key" IS '字典值';
COMMENT ON COLUMN "blade_dict_biz"."dict_value" IS '字典名称';
COMMENT ON COLUMN "blade_dict_biz"."sort" IS '排序';
COMMENT ON COLUMN "blade_dict_biz"."remark" IS '字典备注';
COMMENT ON COLUMN "blade_dict_biz"."is_sealed" IS '是否已封存';
COMMENT ON COLUMN "blade_dict_biz"."is_deleted" IS '是否已删除';
COMMENT ON TABLE "blade_dict_biz" IS '业务字典表';
-- ----------------------------
-- 创建用户部门表
-- ----------------------------
CREATE TABLE "blade_user_dept" (
"id" int8 NOT NULL,
"user_id" int8,
"dept_id" int8,
PRIMARY KEY ("id")
);
COMMENT ON COLUMN "blade_user_dept"."id" IS '主键';
COMMENT ON COLUMN "blade_user_dept"."user_id" IS '用户ID';
COMMENT ON COLUMN "blade_user_dept"."dept_id" IS '部门ID';
COMMENT ON TABLE "blade_user_dept" IS '用户部门表';
-- ----------------------------
-- 新增用户部门表数据
-- ----------------------------
INSERT INTO "blade_user_dept" VALUES (1203503640757788674, 1123598821738675201, 1123598813738675201);
INSERT INTO "blade_user_dept" VALUES (1203503653323923458, 1123598821738675202, 1123598813738675202);
INSERT INTO "blade_user_dept" VALUES (1203503663402835969, 1123598821738675203, 1123598813738675202);
INSERT INTO "blade_user_dept" VALUES (1203503672911323137, 1123598821738675204, 1123598813738675202);

25
doc/sql/update/postgresql-update-2.2.2~2.3.0.sql

@ -0,0 +1,25 @@
-- ----------------------------
-- 增加租户表字段
-- ----------------------------
ALTER TABLE "public"."blade_tenant"
ADD COLUMN "domain" varchar(255) COLLATE "pg_catalog"."default",
ADD COLUMN "background_url" varchar(1000) COLLATE "pg_catalog"."default",
ADD COLUMN "account_number" int2 DEFAULT -1,
ADD COLUMN "expire_time" timestamp(6);
COMMENT ON COLUMN "public"."blade_tenant"."domain" IS '域名地址';
COMMENT ON COLUMN "public"."blade_tenant"."background_url" IS '系统背景';
COMMENT ON COLUMN "public"."blade_tenant"."account_number" IS '账号额度';
COMMENT ON COLUMN "public"."blade_tenant"."expire_time" IS '过期时间';
-- ----------------------------
-- 插入菜单数据
-- ----------------------------
INSERT INTO "blade_menu"("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "remark", "is_deleted")
VALUES ('1164733389658963251', '1123598815738675298', 'xxljob', '任务调度', 'menu', 'http://localhost:7009/xxl-job-admin', 'iconfont iconicon_cspace', 2, 1, 0, 2, '', 0);
-- ----------------------------
-- 插入角色权限数据
-- ----------------------------
INSERT INTO "blade_role_menu"("id","menu_id","role_id")
VALUES ('1161272893873322991', '1164733389658963251', '1123598816738675201');
Loading…
Cancel
Save