Identifying conflicting permissions on the Override Types form

Prior to POST-7767, the system allowed two different permissions to be assigned for the same security group and override type on the Override Types form. Although the form could contain multiple entries with conflicting instructions, only one of the permissions would be effective for the user.

To prevent this ambiguity, the unique key constraint on the OVERRIDE_TYPE_GRP table was updated in POST-7767. Multiple (conflicting) permissions can no longer be assigned for the same security group and override type.

In your existing data, if multiple permissions are assigned for the same security group and override type, the upgrade will fail when trying to apply the new unique key. In this case, you must delete the conflicting entries manually. To identify the conflicting entries, you can use this SQL query:

select 
    OVERRIDE_TYPE_GRP.OTG_ID,
    OVERRIDE_TYPE_GRP.OVRTYP_ID,
    OVERRIDE_TYPE_GRP.WBG_ID,
    OVERRIDE_TYPE_GRP.WBP_ID,
    OVERRIDE_TYPE.OVRTYP_NAME, 
    WORKBRAIN_GROUP.WBG_NAME, 
    WORKBRAIN_PERMISSION.WBP_NAME
from 
    OVERRIDE_TYPE_GRP, 
    OVERRIDE_TYPE, 
    WORKBRAIN_GROUP, 
    WORKBRAIN_PERMISSION,
    (
        select OVRTYP_ID, WBG_ID from OVERRIDE_TYPE_GRP group by OVRTYP_ID, WBG_ID having count(*) > 1
    ) CONFLICTS
where
   OVERRIDE_TYPE_GRP.OVRTYP_ID = CONFLICTS.OVRTYP_ID and
   OVERRIDE_TYPE_GRP.WBG_ID = CONFLICTS.WBG_ID and
   OVERRIDE_TYPE.OVRTYP_ID = OVERRIDE_TYPE_GRP.OVRTYP_ID and
   WORKBRAIN_GROUP.WBG_ID = OVERRIDE_TYPE_GRP.WBG_ID and
   WORKBRAIN_PERMISSION.WBP_ID = OVERRIDE_TYPE_GRP.WBP_ID
order by
   OVERRIDE_TYPE.OVRTYP_NAME, 
   WORKBRAIN_GROUP.WBG_NAME