Issue:
DB changes for split payments (v2)

The following DB changes need to be made to support split payments:

In PaymentIntent:
- Add `active_attempts_group_id` column
- Add `active_attempt_id_type` column

In PaymentAttempt:
- Add `attempts_group_id` column


While currently a `payment_intent` can have only a single `active_attempt`, For split payments case, a `payment_intent` will have a group of active attempts. These attempts will be linked together by the `attempts_group_id`.

This `attempts_group_id` will be stored in the payment intent as the `active_attempts_group_id`. The `active_attempt_id` will be ignored in split payments case.

Resolution:
<think>
PR Context:
- Title: feat(router): Add attempts_group DB changes for split payments (v2)
- Merged: 2025-09-24T08:41:25Z
- Files changed: 13 files
- Commits: 2 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 -->
Added DB changes for split payments

In PaymentIntent:
- Add `active_attempts_group_id` column
- Add `active_attempt_id_type` column

In PaymentAttempt:
- Add `attempts_group_id` column

While currently a payment_intent can have only 
</think>

To implement this, you'll need to modify:


**Detailed Implementation:**


**Commit 1:** feat(router): Add attempts_group DB changes for split payments (v2) (#9466)
Files to modify:


**crates/common_enums/src/enums.rs**
  Add:
    - enum: pub::ActiveAttemptIDType

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

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

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

**crates/hyperswitch_domain_models/src/payments.rs**
  Modify existing code

**crates/hyperswitch_domain_models/src/payments/payment_attempt.rs**
  Modify existing code

**crates/hyperswitch_domain_models/src/payments/payment_intent.rs**
  Modify existing code

**crates/router/src/services/kafka/payment_attempt.rs**
  Modify existing code

**crates/router/src/services/kafka/payment_attempt_event.rs**
  Modify existing code

**crates/router/src/services/kafka/payment_intent.rs**
  Modify existing code

**crates/router/src/services/kafka/payment_intent_event.rs**
  Modify existing code