cancel
Showing results for 
Search instead for 
Did you mean: 

Question on ACT_RU_IDENTITYLINK for DBA adding constraints and indexes

jwestra
Champ in-the-making
Champ in-the-making
Hi!

My DBA is adding more constraints and indexes to the standard postgresql scripts.

Is it valid to say, ACT_RU_IDENTITYLINK rows will have "either" a user_id or a group_id, but never both?

Here is an example, our DBA wants to add:
===============================
alter table act_ru_identitylink
add constraint act_ru_identitylink_check_ids
check ((user_id_ is not null or group_id_ is not null)
   and not (user_id_ is not null and group_id_ is not null));


2.) What operations in Activiti would cause the "ACT_RU_IDENTITYLINK.rev_" column be updated beyond 1?  It seems like an insert or delete table only.
2 REPLIES 2

jwestra
Champ in-the-making
Champ in-the-making
BUMP

jbarrez
Star Contributor
Star Contributor
1) Is it valid to say, ACT_RU_IDENTITYLINK rows will have "either" a user_id or a group_id, but never both?

Yes, for the default out of the box logic that is the case indeed. Custom logic could do that, though.

2) Again, same story. Out of the box, not. But there are use cases where people update the identity links dynamically and then this rev column is important for detecting concurrent changes.