generic unique constraint