Issue:
feat(user_roles): Update both V1 and V2 user roles

Since we are introducing V2 user_roles. Before we start inserting V2 data, we should complete the other operations (update, delete and read).

This issue tracks the progress of changes for update.

Resolution:
<think>
PR Context:
- Title: feat(user_role): Add update by lineage DB function
- Merged: 2024-08-22T05:24:51Z
- Files changed: 9 files
- Commits: 8 commits

Implementation approach:
## Type of Change
<!-- Put an `x` in the boxes that apply -->

- [ ] Bugfix
- [x] New feature
- [ ] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD

## Description
<!-- Describe your changes in detail -->
- This PR adds a new db function which can update a user_role by it's lineage.

### Additional Changes

- [ ] This PR modifies the API contract
- [ ] This PR modifies the database schema
- [ ] This PR modifies application configuration/e
</think>

To implement this, you'll need to modify:


**Detailed Implementation:**


**Commit 1:** feat(user_role): Add update by lineage DB function (#5651)
Files to modify:


**crates/diesel_models/src/query/user_role.rs**
  Remove:
    - function: pub::update_by_user_id_merchant_id
    - function: pub::update_by_user_id_org_id
  Add:
    - function: pub::update_by_user_id_org_id_merchant_id_profile_id

**crates/diesel_models/src/user_role.rs**
  Modify existing code

**crates/router/src/core/user.rs**
  Modify existing code

**crates/router/src/core/user_role.rs**
  Modify existing code

**crates/router/src/db/kafka_store.rs**
  Remove:
    - function: private::update_user_role_by_user_id_merchant_id
    - function: private::update_user_roles_by_user_id_org_id

**crates/router/src/db/user_role.rs**
  Remove:
    - function: private::update_user_role_by_user_id_merchant_id
    - function: private::update_user_roles_by_user_id_org_id

**crates/router/src/routes/app.rs**
  Modify existing code

**crates/router/src/routes/user_role.rs**
  Remove:
    - function: pub::transfer_org_ownership

**crates/router/src/utils/user_role.rs**
  Add:
    - function: pub::update_v1_and_v2_user_roles_in_db