deason 4 년 전
부모
커밋
fe3aa0dd3a
1개의 변경된 파일13개의 추가작업 그리고 0개의 파일을 삭제
  1. 13 0
      upgrade-202011/数据库变更.txt

+ 13 - 0
upgrade-202011/数据库变更.txt

@@ -31,6 +31,19 @@ update ec_b_student set password=UPPER(SHA2(CONCAT(identity_number,password),256
 update ec_b_user set password=UPPER(SHA2(CONCAT(login_name,password),256)) where id not in (select f.user_id from ec_b_user_role_relation f where f.role_id=1) and LENGTH(password)<64;
 
 
+# 数据权限规则表
+CREATE TABLE ec_b_user_data_rule (
+	id BIGINT ( 20 ) NOT NULL AUTO_INCREMENT,
+	root_org_id BIGINT ( 20 ) NOT NULL,
+	user_id BIGINT ( 20 ) NOT NULL,
+	type VARCHAR ( 50 ) NOT NULL,
+	ref_id BIGINT ( 20 ) NOT NULL,
+	enabled bit ( 1 ) NOT NULL DEFAULT b'1',
+	creation_time datetime ( 6 ) NOT NULL,
+	update_time datetime ( 6 ) NOT NULL,
+	PRIMARY KEY ( id ),
+UNIQUE KEY IDX_USER_DATA_RULE_01 ( user_id, type, ref_id )
+) ENGINE = INNODB AUTO_INCREMENT = 0 DEFAULT CHARSET = utf8;
 
 -------------------- 模块: basic End --------------------