delete from rightrelation where righttype = 20800;
delete from rightrelation where righttype = 10028;
delete from rightrelation where righttype = 10029;
delete from rightrelation where righttype = 10030;


insert into rightrelation (UserGroupOid, Tid, RightType, IsActive, Version)
select oid, 0, 20800, 1, 1 from usergroup;

insert into rightrelation (UserGroupOid, Tid, RightType, IsActive, Version)
select oid, 0, 10028, 1, 1 from usergroup;

insert into rightrelation (UserGroupOid, Tid, RightType, IsActive, Version)
select oid, 0, 10029, 1, 1 from usergroup;

insert into rightrelation (UserGroupOid, Tid, RightType, IsActive, Version)
select oid, 0, 10030, 1, 1 from usergroup;