Database constraint to prevent duplicate group memberships