wangwei 7 år sedan
förälder
incheckning
8f91e05664
1 ändrade filer med 5 tillägg och 1 borttagningar
  1. 5 1
      sql/云平台2.0升级-数据割接-基础信息.sql

+ 5 - 1
sql/云平台2.0升级-数据割接-基础信息.sql

@@ -6,4 +6,8 @@ update ecs_core_org t set t.type='PRINTER' where t.type='PRINT_SUPPLIER';
 update ecs_core_org t set t.parent_id=null ,t.root_id=t.id where t.parent_id=0;
 
 --删除ecs_exam_student,ecs_core_user_role的外键 user_id
-DELETE  from ecs_core_user where type='STUDENT'; 
+DELETE  from ecs_core_user where type='STUDENT'; 
+
+--角色割接
+insert into ec_b_user_role_relation(user_id,role_id,role_code)   
+SELECT DISTINCT  X.user_id,Y.id,Y.code from ecs_core_user_role X, ec_b_role Y where x.role_code=Y.code;