Issue:
Bug: [Bug] - modified_at not updated for every state change



- [ ] Refunds - https://github.com/juspay/hyperswitch/issues/5266

Pull request description:
## Type of Change
<!-- Put an `x` in the boxes that apply -->

- [x] Bugfix
- [ ] New feature
- [ ] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD

## Description
<!-- Describe your changes in detail -->
`modified_at` field is now updated at every state change for:
- Payment Attempts
- Payment Intents
- Refunds
- Disputes
- Payouts

### Additional Changes

- [ ] This PR modifies the API contract
- [ ] This PR modifies the database schema
- [ ] This PR modifies application configuration/environment variables

<!--
Provide links to the files with corresponding changes.

Following are the paths where you can find config files:
1. `config`
2. `crates/router/src/configs`
3. `loadtest/config`
-->


## Motivation and Context
<!--
Why is this change required? What problem does it solve?
If it fixes an open issue, please link to the issue here.

If you don't have an issue, we'd recommend starting with one first so the PR
can focus on the implementation (unless it is an obvious bug or documentation fix
that will have little conversation).
-->


## How did you test it?
<!--
Did you write an integration/unit/API test to verify the code changes?
Or did you test this change manually (provide relevant screenshots)?
-->
Just do a Payment Create and Payment Update (or any other kind of update as well to the payment), `modified_at` may get updated at every update
curls:
Payment create:
```bash
curl --location 'http://localhost:8080/payments/pay_mn0Jew5RpmZRG2K1QysX' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_IG9ateOUhGE0KLFEItNN1tsJXcr5M62N7zlbtOlUtStTfPpzSomswbQa4aO2k1B4' \
--data-raw '{
    "amount": 20000,
    "currency": "SGD",
    "confirm": false,
    "capture_method": "manual",
    "capture_on": "2022-09-10T10:11:12Z",
    "amount_to_capture": 6540,
    "email": "joseph@example.com",
    "name": "joseph Doe",
    "phone": "9123456789",
    "phone_country_code": "+65",
    "description": "Its my first payment request",
    "authentication_type": "no_three_ds",
    "payment_method": "card",
    "return_url": "https://duck.com",
    "payment_method_data": {
        "card": {
            "card_number": "4242424242424242",
            "card_exp_month": "10",
            "card_exp_year": "25",
            "card_holder_name": "joseph Doe",
            "card_cvc": "123"
        }
    },
    "billing": {
        "address": {
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "city": "San Fransico",
            "state": "California",
            "zip": "94122",
            "country": "US",
            "first_name": "John",
            "last_name": "Doe"
        }
    },
    "shipping": {
        "address": {
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "city": "San Fransico",
            "state": "California",
            "zip": "94122",
            "country": "US",
            "first_name": "John",
            "last_name": "Doe"
        }
    },
    "statement_descriptor_name": "joseph",
    "statement_descriptor_suffix": "JS",
    "metadata": {
        "udf1": "value1",
        "new_customer": "true",
        "login_date": "2019-09-10T10:11:12Z"
    }
}'
```
Payment Update:
```bash
curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_IG9ateOUhGE0KLFEItNN1tsJXcr5M62N7zlbtOlUtStTfPpzSomswbQa4aO2k1B4' \
--data-raw '{
    "amount": 6540,
    "currency": "USD",
    "confirm": false,
    "capture_method": "manual",
    "capture_on": "2022-09-10T10:11:12Z",
    "amount_to_capture": 6540,
    "customer_id": "StripeCustomer",
    "email": "guest@example.com",
    "name": "John Doe",
    "phone": "999999999",
    "phone_country_code": "+65",
    "description": "Its my first payment request",
    "authentication_type": "no_three_ds",
    "return_url": "https://duck.com",
    "payment_method": "card",
    "payment_method_type": "credit",
    "payment_method_data": {
        "card": {
            "card_number": "4242424242424242",
            "card_exp_month": "10",
            "card_exp_year": "25",
            "card_holder_name": "joseph Doe",
            "card_cvc": "123"
        }
    },
    "billing": {
        "address": {
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "city": "San Fransico",
            "state": "California",
            "zip": "94122",
            "country": "US",
            "first_name": "joseph",
            "last_name": "Doe"
        },
        "phone": {
            "number": "9123456789",
            "country_code": "+91"
        }
    },
    "shipping": {
        "address": {
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "city": "San Fransico",
            "state": "California",
            "zip": "94122",
            "country": "US",
            "first_name": "joseph",
            "last_name": "Doe"
        },
        "phone": {
            "number": "9123456789",
            "country_code": "+91"
        }
    },
    "statement_descriptor_name": "joseph",
    "statement_descriptor_suffix": "JS",
    "metadata": {
        "udf1": "value1",
        "new_customer": "true",
        "login_date": "2019-09-10T10:11:12Z"
    },
    "routing": {
        "type": "single",
        "data": "stripe"
    }
}'
```
<img width="922" alt="Screenshot 2024-07-16 at 3 41 29 PM" src="https://github.com/user-attachments/assets/e1b2f3a8-5998-44e6-9a1f-d607a63b07ea">
<img width="937" alt="Screenshot 2024-07-16 at 3 41 36 PM" src="https://github.com/user-attachments/assets/a15d8464-9720-4175-ba20-ac729e871fbf">

## Checklist
<!-- Put an `x` in the boxes that apply -->

- [x] I formatted the code `cargo +nightly fmt --all`
- [x] I addressed lints thrown by `cargo clippy`
- [x] I reviewed the submitted code
- [ ] I added unit tests for my changes where possible


Testing:

Just do a Payment Create and Payment Update (or any other kind of update as well to the payment), `modified_at` may get updated at every update
curls:
Payment create:
```bash
curl --location 'http://localhost:8080/payments/pay_mn0Jew5RpmZRG2K1QysX' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_IG9ateOUhGE0KLFEItNN1tsJXcr5M62N7zlbtOlUtStTfPpzSomswbQa4aO2k1B4' \
--data-raw '{
    "amount": 20000,
    "currency": "SGD",
    "confirm": false,
    "capture_method": "manual",
    "capture_on": "2022-09-10T10:11:12Z",
    "amount_to_capture": 6540,
    "email": "joseph@example.com",
    "name": "joseph Doe",
    "phone": "9123456789",
    "phone_country_code": "+65",
    "description": "Its my first payment request",
    "authentication_type": "no_three_ds",
    "payment_method": "card",
    "return_url": "https://duck.com",
    "payment_method_data": {
        "card": {
            "card_number": "4242424242424242",
            "card_exp_month": "10",
            "card_exp_year": "25",
            "card_holder_name": "joseph Doe",
            "card_cvc": "123"
        }
    },
    "billing": {
        "address": {
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "city": "San Fransico",
            "state": "California",
            "zip": "94122",
            "country": "US",
            "first_name": "John",
            "last_name": "Doe"
        }
    },
    "shipping": {
        "address": {
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "city": "San Fransico",
            "state": "California",
            "zip": "94122",
            "country": "US",
            "first_name": "John",
            "last_name": "Doe"
        }
    },
    "statement_descriptor_name": "joseph",
    "statement_descriptor_suffix": "JS",
    "metadata": {
        "udf1": "value1",
        "new_customer": "true",
        "login_date": "2019-09-10T10:11:12Z"
    }
}'
```
Payment Update:
```bash
curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_IG9ateOUhGE0KLFEItNN1tsJXcr5M62N7zlbtOlUtStTfPpzSomswbQa4aO2k1B4' \
--data-raw '{
    "amount": 6540,
    "currency": "USD",
    "confirm": false,
    "capture_method": "manual",
    "capture_on": "2022-09-10T10:11:12Z",
    "amount_to_capture": 6540,
    "customer_id": "StripeCustomer",
    "email": "guest@example.com",
    "name": "John Doe",
    "phone": "999999999",
    "phone_country_code": "+65",
    "description": "Its my first payment request",
    "authentication_type": "no_three_ds",
    "return_url": "https://duck.com",
    "payment_method": "card",
    "payment_method_type": "credit",
    "payment_method_data": {
        "card": {
            "card_number": "4242424242424242",
            "card_exp_month": "10",
            "card_exp_year": "25",
            "card_holder_name": "joseph Doe",
            "card_cvc": "123"
        }
    },
    "billing": {
        "address": {
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "city": "San Fransico",
            "state": "California",
            "zip": "94122",
            "country": "US",
            "first_name": "joseph",
            "last_name": "Doe"
        },
        "phone": {
            "number": "9123456789",
            "country_code": "+91"
        }
    },
    "shipping": {
        "address": {
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "city": "San Fransico",
            "state": "California",
            "zip": "94122",
            "country": "US",
            "first_name": "joseph",
            "last_name": "Doe"
        },
        "phone": {
            "number": "9123456789",
            "country_code": "+91"
        }
    },
    "statement_descriptor_name": "joseph",
    "statement_descriptor_suffix": "JS",
    "metadata": {
        "udf1": "value1",
        "new_customer": "true",
        "login_date": "2019-09-10T10:11:12Z"
    },
    "routing": {
        "type": "single",
        "data": "stripe"
    }
}'
```
<img width="922" alt="Screenshot 2024-07-16 at 3 41 29 PM" src="https://github.com/user-attachments/assets/e1b2f3a8-5998-44e6-9a1f-d607a63b07ea">
<img width="937" alt="Screenshot 2024-07-16 at 3 41 36 PM" src="https://github.com/user-attachments/assets/a15d8464-9720-4175-ba20-ac729e871fbf">

Patch:
diff --git a/crates/diesel_models/src/address.rs b/crates/diesel_models/src/address.rs
index aa1d397797d..d695d2a0e70 100644
--- a/crates/diesel_models/src/address.rs
+++ b/crates/diesel_models/src/address.rs
@@ -1,5 +1,5 @@
 use common_utils::id_type;
-use diesel::{AsChangeset, Identifiable, Insertable, Queryable};
+use diesel::{AsChangeset, Identifiable, Insertable, Queryable, Selectable};
 use serde::{Deserialize, Serialize};
 use time::PrimitiveDateTime;
 
@@ -29,8 +29,8 @@ pub struct AddressNew {
     pub email: Option<Encryption>,
 }
 
-#[derive(Clone, Debug, Queryable, Identifiable, Serialize, Deserialize)]
-#[diesel(table_name = address, primary_key(address_id))]
+#[derive(Clone, Debug, Queryable, Identifiable, Selectable, Serialize, Deserialize)]
+#[diesel(table_name = address, primary_key(address_id), check_for_backend(diesel::pg::Pg))]
 pub struct Address {
     pub id: Option<i32>,
     pub address_id: String,
diff --git a/crates/diesel_models/src/api_keys.rs b/crates/diesel_models/src/api_keys.rs
index 7676e20d224..3b6de46e085 100644
--- a/crates/diesel_models/src/api_keys.rs
+++ b/crates/diesel_models/src/api_keys.rs
@@ -1,11 +1,13 @@
-use diesel::{AsChangeset, AsExpression, Identifiable, Insertable, Queryable};
+use diesel::{AsChangeset, AsExpression, Identifiable, Insertable, Queryable, Selectable};
 use serde::{Deserialize, Serialize};
 use time::PrimitiveDateTime;
 
 use crate::schema::api_keys;
 
-#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, Identifiable, Queryable)]
-#[diesel(table_name = api_keys, primary_key(key_id))]
+#[derive(
+    serde::Serialize, serde::Deserialize, Debug, Clone, Identifiable, Queryable, Selectable,
+)]
+#[diesel(table_name = api_keys, primary_key(key_id), check_for_backend(diesel::pg::Pg))]
 pub struct ApiKey {
     pub key_id: String,
     pub merchant_id: String,
diff --git a/crates/diesel_models/src/authentication.rs b/crates/diesel_models/src/authentication.rs
index a94cbe96054..050bc291c0b 100644
--- a/crates/diesel_models/src/authentication.rs
+++ b/crates/diesel_models/src/authentication.rs
@@ -1,11 +1,13 @@
-use diesel::{AsChangeset, Identifiable, Insertable, Queryable};
+use diesel::{AsChangeset, Identifiable, Insertable, Queryable, Selectable};
 use serde::{self, Deserialize, Serialize};
 use serde_json;
 
 use crate::schema::authentication;
 
-#[derive(Clone, Debug, Eq, PartialEq, Identifiable, Queryable, Serialize, Deserialize)]
-#[diesel(table_name = authentication,  primary_key(authentication_id))]
+#[derive(
+    Clone, Debug, Eq, PartialEq, Identifiable, Queryable, Selectable, Serialize, Deserialize,
+)]
+#[diesel(table_name = authentication,  primary_key(authentication_id), check_for_backend(diesel::pg::Pg))]
 pub struct Authentication {
     pub authentication_id: String,
     pub merchant_id: String,
diff --git a/crates/diesel_models/src/authorization.rs b/crates/diesel_models/src/authorization.rs
index a7f13821d89..694577bba3f 100644
--- a/crates/diesel_models/src/authorization.rs
+++ b/crates/diesel_models/src/authorization.rs
@@ -1,13 +1,14 @@
 use common_utils::types::MinorUnit;
-use diesel::{AsChangeset, Identifiable, Insertable, Queryable};
+use diesel::{AsChangeset, Identifiable, Insertable, Queryable, Selectable};
 use serde::{Deserialize, Serialize};
 use time::PrimitiveDateTime;
 
 use crate::{enums as storage_enums, schema::incremental_authorization};
 
-#[derive(Clone, Debug, Eq, PartialEq, Identifiable, Queryable, Serialize, Deserialize, Hash)]
-#[diesel(table_name = incremental_authorization)]
-#[diesel(primary_key(authorization_id, merchant_id))]
+#[derive(
+    Clone, Debug, Eq, PartialEq, Identifiable, Queryable, Selectable, Serialize, Deserialize, Hash,
+)]
+#[diesel(table_name = incremental_authorization, primary_key(authorization_id, merchant_id), check_for_backend(diesel::pg::Pg))]
 pub struct Authorization {
     pub authorization_id: String,
     pub merchant_id: String,
diff --git a/crates/diesel_models/src/blocklist.rs b/crates/diesel_models/src/blocklist.rs
index 9e88802aa3b..14dbaf2fe43 100644
--- a/crates/diesel_models/src/blocklist.rs
+++ b/crates/diesel_models/src/blocklist.rs
@@ -1,4 +1,4 @@
-use diesel::{Identifiable, Insertable, Queryable};
+use diesel::{Identifiable, Insertable, Queryable, Selectable};
 use serde::{Deserialize, Serialize};
 
 use crate::schema::blocklist;
@@ -13,8 +13,10 @@ pub struct BlocklistNew {
     pub created_at: time::PrimitiveDateTime,
 }
 
-#[derive(Clone, Debug, Eq, PartialEq, Identifiable, Queryable, Deserialize, Serialize)]
-#[diesel(table_name = blocklist)]
+#[derive(
+    Clone, Debug, Eq, PartialEq, Identifiable, Queryable, Selectable, Deserialize, Serialize,
+)]
+#[diesel(table_name = blocklist, check_for_backend(diesel::pg::Pg))]
 pub struct Blocklist {
     #[serde(skip)]
     pub id: i32,
diff --git a/crates/diesel_models/src/blocklist_fingerprint.rs b/crates/diesel_models/src/blocklist_fingerprint.rs
index e75856622e2..ceea5134bb3 100644
--- a/crates/diesel_models/src/blocklist_fingerprint.rs
+++ b/crates/diesel_models/src/blocklist_fingerprint.rs
@@ -1,4 +1,4 @@
-use diesel::{Identifiable, Insertable, Queryable};
+use diesel::{Identifiable, Insertable, Queryable, Selectable};
 use serde::{Deserialize, Serialize};
 
 use crate::schema::blocklist_fingerprint;
@@ -13,8 +13,10 @@ pub struct BlocklistFingerprintNew {
     pub created_at: time::PrimitiveDateTime,
 }
 
-#[derive(Clone, Debug, Eq, PartialEq, Queryable, Identifiable, Deserialize, Serialize)]
-#[diesel(table_name = blocklist_fingerprint)]
+#[derive(
+    Clone, Debug, Eq, PartialEq, Queryable, Identifiable, Selectable, Deserialize, Serialize,
+)]
+#[diesel(table_name = blocklist_fingerprint, check_for_backend(diesel::pg::Pg))]
 pub struct BlocklistFingerprint {
     #[serde(skip_serializing)]
     pub id: i32,
diff --git a/crates/diesel_models/src/blocklist_lookup.rs b/crates/diesel_models/src/blocklist_lookup.rs
index ad2a893e03d..bebad02e780 100644
--- a/crates/diesel_models/src/blocklist_lookup.rs
+++ b/crates/diesel_models/src/blocklist_lookup.rs
@@ -1,4 +1,4 @@
-use diesel::{Identifiable, Insertable, Queryable};
+use diesel::{Identifiable, Insertable, Queryable, Selectable};
 use serde::{Deserialize, Serialize};
 
 use crate::schema::blocklist_lookup;
@@ -10,8 +10,19 @@ pub struct BlocklistLookupNew {
     pub fingerprint: String,
 }
 
-#[derive(Default, Clone, Debug, Eq, PartialEq, Identifiable, Queryable, Deserialize, Serialize)]
-#[diesel(table_name = blocklist_lookup)]
+#[derive(
+    Default,
+    Clone,
+    Debug,
+    Eq,
+    PartialEq,
+    Identifiable,
+    Queryable,
+    Selectable,
+    Deserialize,
+    Serialize,
+)]
+#[diesel(table_name = blocklist_lookup, check_for_backend(diesel::pg::Pg))]
 pub struct BlocklistLookup {
     #[serde(skip)]
     pub id: i32,
diff --git a/crates/diesel_models/src/business_profile.rs b/crates/diesel_models/src/business_profile.rs
index 48eedc6110c..af343119060 100644
--- a/crates/diesel_models/src/business_profile.rs
+++ b/crates/diesel_models/src/business_profile.rs
@@ -1,5 +1,5 @@
 use common_utils::pii;
-use diesel::{AsChangeset, Identifiable, Insertable, Queryable};
+use diesel::{AsChangeset, Identifiable, Insertable, Queryable, Selectable};
 
 use crate::schema::business_profile;
 
@@ -10,9 +10,10 @@ use crate::schema::business_profile;
     serde::Serialize,
     Identifiable,
     Queryable,
+    Selectable,
     router_derive::DebugAsDisplay,
 )]
-#[diesel(table_name = business_profile, primary_key(profile_id))]
+#[diesel(table_name = business_profile, primary_key(profile_id), check_for_backend(diesel::pg::Pg))]
 pub struct BusinessProfile {
     pub profile_id: String,
     pub merchant_id: String,
diff --git a/crates/diesel_models/src/capture.rs b/crates/diesel_models/src/capture.rs
index 0a66ae789aa..cff09638a40 100644
--- a/crates/diesel_models/src/capture.rs
+++ b/crates/diesel_models/src/capture.rs
@@ -1,13 +1,14 @@
 use common_utils::types::MinorUnit;
-use diesel::{AsChangeset, Identifiable, Insertable, Queryable};
+use diesel::{AsChangeset, Identifiable, Insertable, Queryable, Selectable};
 use serde::{Deserialize, Serialize};
 use time::PrimitiveDateTime;
 
 use crate::{enums as storage_enums, schema::captures};
 
-#[derive(Clone, Debug, Eq, PartialEq, Identifiable, Queryable, Serialize, Deserialize, Hash)]
-#[diesel(table_name = captures)]
-#[diesel(primary_key(capture_id))]
+#[derive(
+    Clone, Debug, Eq, PartialEq, Identifiable, Queryable, Selectable, Serialize, Deserialize, Hash,
+)]
+#[diesel(table_name = captures, primary_key(capture_id), check_for_backend(diesel::pg::Pg))]
 pub struct Capture {
     pub capture_id: String,
     pub payment_id: String,
diff --git a/crates/diesel_models/src/cards_info.rs b/crates/diesel_models/src/cards_info.rs
index 8f0a4af23af..3e0d24723d1 100644
--- a/crates/diesel_models/src/cards_info.rs
+++ b/crates/diesel_models/src/cards_info.rs
@@ -1,10 +1,12 @@
-use diesel::{Identifiable, Queryable};
+use diesel::{Identifiable, Queryable, Selectable};
 use time::PrimitiveDateTime;
 
 use crate::{enums as storage_enums, schema::cards_info};
 
-#[derive(Clone, Debug, Queryable, Identifiable, serde::Deserialize, serde::Serialize)]
-#[diesel(table_name = cards_info, primary_key(card_iin))]
+#[derive(
+    Clone, Debug, Queryable, Identifiable, Selectable, serde::Deserialize, serde::Serialize,
+)]
+#[diesel(table_name = cards_info, primary_key(card_iin), check_for_backend(diesel::pg::Pg))]
 pub struct CardInfo {
     pub card_iin: String,
     pub card_issuer: Option<String>,
diff --git a/crates/diesel_models/src/configs.rs b/crates/diesel_models/src/configs.rs
index 35fbb44647d..2b30aa6a972 100644
--- a/crates/diesel_models/src/configs.rs
+++ b/crates/diesel_models/src/configs.rs
@@ -1,6 +1,6 @@
 use std::convert::From;
 
-use diesel::{AsChangeset, Identifiable, Insertable, Queryable};
+use diesel::{AsChangeset, Identifiable, Insertable, Queryable, Selectable};
 use serde::{Deserialize, Serialize};
 
 use crate::schema::configs;
@@ -13,9 +13,8 @@ pub struct ConfigNew {
     pub config: String,
 }
 
-#[derive(Default, Clone, Debug, Identifiable, Queryable, Deserialize, Serialize)]
-#[diesel(table_name = configs)]
-
+#[derive(Default, Clone, Debug, Identifiable, Queryable, Selectable, Deserialize, Serialize)]
+#[diesel(table_name = configs, check_for_backend(diesel::pg::Pg))]
 pub struct Config {
     #[serde(skip)]
     pub id: i32,
diff --git a/crates/diesel_models/src/customers.rs b/crates/diesel_models/src/customers.rs
index 63be0351a0c..deb1ac73f41 100644
--- a/crates/diesel_models/src/customers.rs
+++ b/crates/diesel_models/src/customers.rs
@@ -1,5 +1,5 @@
 use common_utils::{id_type, pii};
-use diesel::{AsChangeset, Identifiable, Insertable, Queryable};
+use diesel::{AsChangeset, Identifiable, Insertable, Queryable, Selectable};
 use time::PrimitiveDateTime;
 
 use crate::{encryption::Encryption, schema::customers};
@@ -52,8 +52,10 @@ impl From<CustomerNew> for Customer {
     }
 }
 
-#[derive(Clone, Debug, Identifiable, Queryable, serde::Deserialize, serde::Serialize)]
-#[diesel(table_name = customers)]
+#[derive(
+    Clone, Debug, Identifiable, Queryable, Selectable, serde::Deserialize, serde::Serialize,
+)]
+#[diesel(table_name = customers, check_for_backend(diesel::pg::Pg))]
 pub struct Customer {
     pub id: i32,
     pub customer_id: id_type::CustomerId,
diff --git a/crates/diesel_models/src/dispute.rs b/crates/diesel_models/src/dispute.rs
index eae8281a99d..184dce15641 100644
--- a/crates/diesel_models/src/dispute.rs
+++ b/crates/diesel_models/src/dispute.rs
@@ -1,5 +1,5 @@
 use common_utils::custom_serde;
-use diesel::{AsChangeset, Identifiable, Insertable, Queryable};
+use diesel::{AsChangeset, Identifiable, Insertable, Queryable, Selectable};
 use masking::Secret;
 use serde::Serialize;
 use time::PrimitiveDateTime;
@@ -32,8 +32,8 @@ pub struct DisputeNew {
     pub dispute_amount: i64,
 }
 
-#[derive(Clone, Debug, PartialEq, Serialize, Identifiable, Queryable)]
-#[diesel(table_name = dispute)]
+#[derive(Clone, Debug, PartialEq, Serialize, Identifiable, Queryable, Selectable)]
+#[diesel(table_name = dispute, check_for_backend(diesel::pg::Pg))]
 pub struct Dispute {
     #[serde(skip_serializing)]
     pub id: i32,
@@ -83,7 +83,7 @@ pub enum DisputeUpdate {
     },
 }
 
-#[derive(Clone, Debug, Default, AsChangeset, router_derive::DebugAsDisplay)]
+#[derive(Clone, Debug, AsChangeset, router_derive::DebugAsDisplay)]
 #[diesel(table_name = dispute)]
 pub struct DisputeUpdateInternal {
     dispute_stage: Option<storage_enums::DisputeStage>,
@@ -93,7 +93,7 @@ pub struct DisputeUpdateInternal {
     connector_reason_code: Option<String>,
     challenge_required_by: Option<PrimitiveDateTime>,
     connector_updated_at: Option<PrimitiveDateTime>,
-    modified_at: Option<PrimitiveDateTime>,
+    modified_at: PrimitiveDateTime,
     evidence: Option<Secret<serde_json::Value>>,
 }
 
@@ -116,8 +116,8 @@ impl From<DisputeUpdate> for DisputeUpdateInternal {
                 connector_reason_code,
                 challenge_required_by,
                 connector_updated_at,
-                modified_at: Some(common_utils::date_time::now()),
-                ..Default::default()
+                modified_at: common_utils::date_time::now(),
+                evidence: None,
             },
             DisputeUpdate::StatusUpdate {
                 dispute_status,
@@ -125,12 +125,24 @@ impl From<DisputeUpdate> for DisputeUpdateInternal {
             } => Self {
                 dispute_status: Some(dispute_status),
                 connector_status,
-                modified_at: Some(common_utils::date_time::now()),
-                ..Default::default()
+                modified_at: common_utils::date_time::now(),
+                dispute_stage: None,
+                connector_reason: None,
+                connector_reason_code: None,
+                challenge_required_by: None,
+                connector_updated_at: None,
+                evidence: None,
             },
             DisputeUpdate::EvidenceUpdate { evidence } => Self {
                 evidence: Some(evidence),
-                ..Default::default()
+                dispute_stage: None,
+                dispute_status: None,
+                connector_status: None,
+                connector_reason: None,
+                connector_reason_code: None,
+                challenge_required_by: None,
+                connector_updated_at: None,
+                modified_at: common_utils::date_time::now(),
             },
         }
     }
diff --git a/crates/diesel_models/src/events.rs b/crates/diesel_models/src/events.rs
index fe87f307fb3..b3b1230441f 100644
--- a/crates/diesel_models/src/events.rs
+++ b/crates/diesel_models/src/events.rs
@@ -1,7 +1,6 @@
 use common_utils::custom_serde;
 use diesel::{
-    deserialize::FromSqlRow, expression::AsExpression, AsChangeset, Identifiable, Insertable,
-    Queryable,
+    expression::AsExpression, AsChangeset, Identifiable, Insertable, Queryable, Selectable,
 };
 use serde::{Deserialize, Serialize};
 use time::PrimitiveDateTime;
@@ -36,8 +35,8 @@ pub struct EventUpdateInternal {
     pub response: Option<Encryption>,
 }
 
-#[derive(Clone, Debug, Deserialize, Serialize, Identifiable, Queryable)]
-#[diesel(table_name = events, primary_key(event_id))]
+#[derive(Clone, Debug, Deserialize, Serialize, Identifiable, Queryable, Selectable)]
+#[diesel(table_name = events, primary_key(event_id), check_for_backend(diesel::pg::Pg))]
 pub struct Event {
     pub event_id: String,
     pub event_type: storage_enums::EventType,
@@ -60,7 +59,7 @@ pub struct Event {
     pub metadata: Option<EventMetadata>,
 }
 
-#[derive(Clone, Debug, Deserialize, Serialize, AsExpression, FromSqlRow)]
+#[derive(Clone, Debug, Deserialize, Serialize, AsExpression, diesel::FromSqlRow)]
 #[diesel(sql_type = diesel::sql_types::Jsonb)]
 pub enum EventMetadata {
     Payment {
diff --git a/crates/diesel_models/src/file.rs b/crates/diesel_models/src/file.rs
index 20150a6928d..af584323b92 100644
--- a/crates/diesel_models/src/file.rs
+++ b/crates/diesel_models/src/file.rs
@@ -1,5 +1,5 @@
 use common_utils::custom_serde;
-use diesel::{AsChangeset, Identifiable, Insertable, Queryable};
+use diesel::{AsChangeset, Identifiable, Insertable, Queryable, Selectable};
 use masking::{Deserialize, Serialize};
 
 use crate::schema::file_metadata;
@@ -21,8 +21,8 @@ pub struct FileMetadataNew {
     pub merchant_connector_id: Option<String>,
 }
 
-#[derive(Clone, Debug, Deserialize, Serialize, Identifiable, Queryable)]
-#[diesel(table_name = file_metadata, primary_key(file_id, merchant_id))]
+#[derive(Clone, Debug, Deserialize, Serialize, Identifiable, Queryable, Selectable)]
+#[diesel(table_name = file_metadata, primary_key(file_id, merchant_id), check_for_backend(diesel::pg::Pg))]
 pub struct FileMetadata {
     #[serde(skip_serializing)]
     pub file_id: String,
diff --git a/crates/diesel_models/src/fraud_check.rs b/crates/diesel_models/src/fraud_check.rs
index 5513afcfbd1..2cda6bbd7f5 100644
--- a/crates/diesel_models/src/fraud_check.rs
+++ b/crates/diesel_models/src/fraud_check.rs
@@ -1,5 +1,5 @@
 use common_enums as storage_enums;
-use diesel::{AsChangeset, Identifiable, Insertable, Queryable};
+use diesel::{AsChangeset, Identifiable, Insertable, Queryable, Selectable};
 use masking::{Deserialize, Serialize};
 use time::PrimitiveDateTime;
 
@@ -7,8 +7,8 @@ use crate::{
     enums::{FraudCheckLastStep, FraudCheckStatus, FraudCheckType},
     schema::fraud_check,
 };
-#[derive(Clone, Debug, Identifiable, Queryable, Serialize, Deserialize)]
-#[diesel(table_name = fraud_check,  primary_key(payment_id, merchant_id))]
+#[derive(Clone, Debug, Identifiable, Queryable, Selectable, Serialize, Deserialize)]
+#[diesel(table_name = fraud_check,  primary_key(payment_id, merchant_id), check_for_backend(diesel::pg::Pg))]
 pub struct FraudCheck {
     pub frm_id: String,
     pub payment_id: String,
diff --git a/crates/diesel_models/src/generic_link.rs b/crates/diesel_models/src/generic_link.rs
index b3e3da7a6d8..1017d2d47d4 100644
--- a/crates/diesel_models/src/generic_link.rs
+++ b/crates/diesel_models/src/generic_link.rs
@@ -5,16 +5,17 @@ use common_utils::{
         PayoutLinkData, PayoutLinkStatus,
     },
 };
-use diesel::{AsChangeset, Identifiable, Insertable, Queryable};
+use diesel::{AsChangeset, Identifiable, Insertable, Queryable, Selectable};
 use masking::Secret;
 use serde::{Deserialize, Serialize};
 use time::{Duration, PrimitiveDateTime};
 
 use crate::{enums as storage_enums, schema::generic_link};
 
-#[derive(Clone, Debug, Eq, PartialEq, Identifiable, Queryable, Serialize, Deserialize)]
-#[diesel(table_name = generic_link)]
-#[diesel(primary_key(link_id))]
+#[derive(
+    Clone, Debug, Eq, PartialEq, Identifiable, Queryable, Selectable, Serialize, Deserialize,
+)]
+#[diesel(table_name = generic_link, primary_key(link_id), check_for_backend(diesel::pg::Pg))]
 pub struct GenericLink {
     pub link_id: String,
     pub primary_reference: String,
diff --git a/crates/diesel_models/src/gsm.rs b/crates/diesel_models/src/gsm.rs
index 231f60bb251..6a444410fa8 100644
--- a/crates/diesel_models/src/gsm.rs
+++ b/crates/diesel_models/src/gsm.rs
@@ -4,7 +4,7 @@ use common_utils::{
     custom_serde,
     events::{ApiEventMetric, ApiEventsType},
 };
-use diesel::{AsChangeset, Identifiable, Insertable, Queryable};
+use diesel::{AsChangeset, Identifiable, Insertable, Queryable, Selectable};
 use time::PrimitiveDateTime;
 
 use crate::schema::gateway_status_map;
@@ -19,9 +19,10 @@ use crate::schema::gateway_status_map;
     router_derive::DebugAsDisplay,
     Identifiable,
     Queryable,
+    Selectable,
     serde::Serialize,
 )]
-#[diesel(table_name = gateway_status_map, primary_key(connector, flow, sub_flow, code, message))]
+#[diesel(table_name = gateway_status_map, primary_key(connector, flow, sub_flow, code, message), check_for_backend(diesel::pg::Pg))]
 pub struct GatewayStatusMap {
     pub connector: String,
     pub flow: String,
diff --git a/crates/diesel_models/src/locker_mock_up.rs b/crates/diesel_models/src/locker_mock_up.rs
index e078b272cba..e88ad95e236 100644
--- a/crates/diesel_models/src/locker_mock_up.rs
+++ b/crates/diesel_models/src/locker_mock_up.rs
@@ -1,10 +1,10 @@
 use common_utils::id_type;
-use diesel::{Identifiable, Insertable, Queryable};
+use diesel::{Identifiable, Insertable, Queryable, Selectable};
 
 use crate::schema::locker_mock_up;
 
-#[derive(Clone, Debug, Eq, Identifiable, Queryable, PartialEq)]
-#[diesel(table_name = locker_mock_up)]
+#[derive(Clone, Debug, Eq, Identifiable, Queryable, Selectable, PartialEq)]
+#[diesel(table_name = locker_mock_up, check_for_backend(diesel::pg::Pg))]
 pub struct LockerMockUp {
     pub id: i32,
     pub card_id: String,
diff --git a/crates/diesel_models/src/mandate.rs b/crates/diesel_models/src/mandate.rs
index 9a32e1049d5..793174dea71 100644
--- a/crates/diesel_models/src/mandate.rs
+++ b/crates/diesel_models/src/mandate.rs
@@ -1,13 +1,15 @@
 use common_enums::MerchantStorageScheme;
 use common_utils::{id_type, pii};
-use diesel::{AsChangeset, Identifiable, Insertable, Queryable};
+use diesel::{AsChangeset, Identifiable, Insertable, Queryable, Selectable};
 use masking::Secret;
 use time::PrimitiveDateTime;
 
 use crate::{enums as storage_enums, schema::mandate};
 
-#[derive(Clone, Debug, Identifiable, Queryable, serde::Serialize, serde::Deserialize)]
-#[diesel(table_name = mandate)]
+#[derive(
+    Clone, Debug, Identifiable, Queryable, Selectable, serde::Serialize, serde::Deserialize,
+)]
+#[diesel(table_name = mandate, check_for_backend(diesel::pg::Pg))]
 pub struct Mandate {
     pub id: i32,
     pub mandate_id: String,
diff --git a/crates/diesel_models/src/merchant_account.rs b/crates/diesel_models/src/merchant_account.rs
index f0078ca0ba1..71c437bbb41 100644
--- a/crates/diesel_models/src/merchant_account.rs
+++ b/crates/diesel_models/src/merchant_account.rs
@@ -1,5 +1,5 @@
 use common_utils::pii;
-use diesel::{AsChangeset, Identifiable, Insertable, Queryable};
+use diesel::{AsChangeset, Identifiable, Insertable, Queryable, Selectable};
 
 use crate::{encryption::Encryption, enums as storage_enums, schema::merchant_account};
 
@@ -10,9 +10,10 @@ use crate::{encryption::Encryption, enums as storage_enums, schema::merchant_acc
     serde::Serialize,
     Identifiable,
     Queryable,
+    Selectable,
     router_derive::DebugAsDisplay,
 )]
-#[diesel(table_name = merchant_account)]
+#[diesel(table_name = merchant_account, check_for_backend(diesel::pg::Pg))]
 pub struct MerchantAccount {
     pub id: i32,
     pub merchant_id: String,
diff --git a/crates/diesel_models/src/merchant_connector_account.rs b/crates/diesel_models/src/merchant_connector_account.rs
index 680e3dacc85..6f907b1d607 100644
--- a/crates/diesel_models/src/merchant_connector_account.rs
+++ b/crates/diesel_models/src/merchant_connector_account.rs
@@ -1,7 +1,7 @@
 use std::fmt::Debug;
 
 use common_utils::pii;
-use diesel::{AsChangeset, Identifiable, Insertable, Queryable};
+use diesel::{AsChangeset, Identifiable, Insertable, Queryable, Selectable};
 use masking::Secret;
 
 use crate::{encryption::Encryption, enums as storage_enums, schema::merchant_connector_account};
@@ -13,9 +13,10 @@ use crate::{encryption::Encryption, enums as storage_enums, schema::merchant_con
     serde::Deserialize,
     Identifiable,
     Queryable,
+    Selectable,
     router_derive::DebugAsDisplay,
 )]
-#[diesel(table_name = merchant_connector_account)]
+#[diesel(table_name = merchant_connector_account, check_for_backend(diesel::pg::Pg))]
 pub struct MerchantConnectorAccount {
     pub id: i32,
     pub merchant_id: String,
diff --git a/crates/diesel_models/src/merchant_key_store.rs b/crates/diesel_models/src/merchant_key_store.rs
index ef17ace1491..30781927e94 100644
--- a/crates/diesel_models/src/merchant_key_store.rs
+++ b/crates/diesel_models/src/merchant_key_store.rs
@@ -1,5 +1,5 @@
 use common_utils::custom_serde;
-use diesel::{AsChangeset, Identifiable, Insertable, Queryable};
+use diesel::{AsChangeset, Identifiable, Insertable, Queryable, Selectable};
 use time::PrimitiveDateTime;
 
 use crate::{encryption::Encryption, schema::merchant_key_store};
@@ -11,10 +11,10 @@ use crate::{encryption::Encryption, schema::merchant_key_store};
     serde::Deserialize,
     Identifiable,
     Queryable,
+    Selectable,
     router_derive::DebugAsDisplay,
 )]
-#[diesel(table_name = merchant_key_store)]
-#[diesel(primary_key(merchant_id))]
+#[diesel(table_name = merchant_key_store, primary_key(merchant_id), check_for_backend(diesel::pg::Pg))]
 pub struct MerchantKeyStore {
     pub merchant_id: String,
     pub key: Encryption,
diff --git a/crates/diesel_models/src/organization.rs b/crates/diesel_models/src/organization.rs
index 2f407b8cbfd..5c2012a6d9a 100644
--- a/crates/diesel_models/src/organization.rs
+++ b/crates/diesel_models/src/organization.rs
@@ -1,9 +1,9 @@
-use diesel::{AsChangeset, Identifiable, Insertable, Queryable};
+use diesel::{AsChangeset, Identifiable, Insertable, Queryable, Selectable};
 
 use crate::schema::organization;
 
-#[derive(Clone, Debug, Identifiable, Queryable)]
-#[diesel(table_name = organization, primary_key(org_id))]
+#[derive(Clone, Debug, Identifiable, Queryable, Selectable)]
+#[diesel(table_name = organization, primary_key(org_id), check_for_backend(diesel::pg::Pg))]
 pub struct Organization {
     pub org_id: String,
     pub org_name: Option<String>,
diff --git a/crates/diesel_models/src/payment_attempt.rs b/crates/diesel_models/src/payment_attempt.rs
index c45eee7b0ce..626de947102 100644
--- a/crates/diesel_models/src/payment_attempt.rs
+++ b/crates/diesel_models/src/payment_attempt.rs
@@ -1,5 +1,5 @@
 use common_utils::pii;
-use diesel::{AsChangeset, Identifiable, Insertable, Queryable};
+use diesel::{AsChangeset, Identifiable, Insertable, Queryable, Selectable};
 use serde::{Deserialize, Serialize};
 use time::PrimitiveDateTime;
 
@@ -8,8 +8,10 @@ use crate::{
     schema::payment_attempt,
 };
 
-#[derive(Clone, Debug, Eq, PartialEq, Identifiable, Queryable, Serialize, Deserialize)]
-#[diesel(table_name = payment_attempt, primary_key(attempt_id, merchant_id))]
+#[derive(
+    Clone, Debug, Eq, PartialEq, Identifiable, Queryable, Selectable, Serialize, Deserialize,
+)]
+#[diesel(table_name = payment_attempt, primary_key(attempt_id, merchant_id), check_for_backend(diesel::pg::Pg))]
 pub struct PaymentAttempt {
     pub payment_id: String,
     pub merchant_id: String,
@@ -92,9 +94,7 @@ pub struct PaymentListFilters {
     pub payment_method: Vec<storage_enums::PaymentMethod>,
 }
 
-#[derive(
-    Clone, Debug, Default, Insertable, router_derive::DebugAsDisplay, Serialize, Deserialize,
-)]
+#[derive(Clone, Debug, Insertable, router_derive::DebugAsDisplay, Serialize, Deserialize)]
 #[diesel(table_name = payment_attempt)]
 pub struct PaymentAttemptNew {
     pub payment_id: String,
@@ -117,10 +117,10 @@ pub struct PaymentAttemptNew {
     pub capture_on: Option<PrimitiveDateTime>,
     pub confirm: bool,
     pub authentication_type: Option<storage_enums::AuthenticationType>,
-    #[serde(default, with = "common_utils::custom_serde::iso8601::option")]
-    pub created_at: Option<PrimitiveDateTime>,
-    #[serde(default, with = "common_utils::custom_serde::iso8601::option")]
-    pub modified_at: Option<PrimitiveDateTime>,
+    #[serde(with = "common_utils::custom_serde::iso8601")]
+    pub created_at: PrimitiveDateTime,
+    #[serde(with = "common_utils::custom_serde::iso8601")]
+    pub modified_at: PrimitiveDateTime,
     #[serde(default, with = "common_utils::custom_serde::iso8601::option")]
     pub last_synced: Option<PrimitiveDateTime>,
     pub cancellation_reason: Option<String>,
@@ -366,7 +366,7 @@ pub enum PaymentAttemptUpdate {
     },
 }
 
-#[derive(Clone, Debug, Default, AsChangeset, router_derive::DebugAsDisplay)]
+#[derive(Clone, Debug, AsChangeset, router_derive::DebugAsDisplay)]
 #[diesel(table_name = payment_attempt)]
 pub struct PaymentAttemptUpdateInternal {
     amount: Option<i64>,
@@ -381,7 +381,7 @@ pub struct PaymentAttemptUpdateInternal {
     error_message: Option<Option<String>>,
     payment_method_id: Option<String>,
     cancellation_reason: Option<String>,
-    modified_at: Option<PrimitiveDateTime>,
+    modified_at: PrimitiveDateTime,
     mandate_id: Option<String>,
     browser_info: Option<serde_json::Value>,
     payment_token: Option<String>,
@@ -571,7 +571,7 @@ impl From<PaymentAttemptUpdate> for PaymentAttemptUpdateInternal {
                 authentication_type,
                 payment_method,
                 payment_token,
-                modified_at: Some(common_utils::date_time::now()),
+                modified_at: common_utils::date_time::now(),
                 payment_method_data,
                 payment_method_type,
                 payment_experience,
@@ -583,16 +583,85 @@ impl From<PaymentAttemptUpdate> for PaymentAttemptUpdateInternal {
                 fingerprint_id,
                 payment_method_billing_address_id,
                 updated_by,
-                ..Default::default()
+                net_amount: None,
+                connector_transaction_id: None,
+                connector: None,
+                error_message: None,
+                payment_method_id: None,
+                cancellation_reason: None,
+                mandate_id: None,
+                browser_info: None,
+                error_code: None,
+                connector_metadata: None,
+                straight_through_algorithm: None,
+                preprocessing_step_id: None,
+                error_reason: None,
+                connector_response_reference_id: None,
+                multiple_capture_count: None,
+                amount_capturable: None,
+                merchant_connector_id: None,
+                authentication_data: None,
+                encoded_data: None,
+                unified_code: None,
+                unified_message: None,
+                external_three_ds_authentication_attempted: None,
+                authentication_connector: None,
+                authentication_id: None,
+                charge_id: None,
+                client_source: None,
+                client_version: None,
+                customer_acceptance: None,
             },
             PaymentAttemptUpdate::AuthenticationTypeUpdate {
                 authentication_type,
                 updated_by,
             } => Self {
                 authentication_type: Some(authentication_type),
-                modified_at: Some(common_utils::date_time::now()),
+                modified_at: common_utils::date_time::now(),
                 updated_by,
-                ..Default::default()
+                amount: None,
+                net_amount: None,
+                currency: None,
+                status: None,
+                connector_transaction_id: None,
+                amount_to_capture: None,
+                connector: None,
+                payment_method: None,
+                error_message: None,
+                payment_method_id: None,
+                cancellation_reason: None,
+                mandate_id: None,
+                browser_info: None,
+                payment_token: None,
+                error_code: None,
+                connector_metadata: None,
+                payment_method_data: None,
+                payment_method_type: None,
+                payment_experience: None,
+                business_sub_label: None,
+                straight_through_algorithm: None,
+                preprocessing_step_id: None,
+                error_reason: None,
+                capture_method: None,
+                connector_response_reference_id: None,
+                multiple_capture_count: None,
+                surcharge_amount: None,
+                tax_amount: None,
+                amount_capturable: None,
+                merchant_connector_id: None,
+                authentication_data: None,
+                encoded_data: None,
+                unified_code: None,
+                unified_message: None,
+                external_three_ds_authentication_attempted: None,
+                authentication_connector: None,
+                authentication_id: None,
+                fingerprint_id: None,
+                payment_method_billing_address_id: None,
+                charge_id: None,
+                client_source: None,
+                client_version: None,
+                customer_acceptance: None,
             },
             PaymentAttemptUpdate::ConfirmUpdate {
                 amount,
@@ -631,7 +700,7 @@ impl From<PaymentAttemptUpdate> for PaymentAttemptUpdateInternal {
                 authentication_type,
                 status: Some(status),
                 payment_method,
-                modified_at: Some(common_utils::date_time::now()),
+                modified_at: common_utils::date_time::now(),
                 browser_info,
                 connector: connector.map(Some),
                 payment_token,
@@ -657,7 +726,21 @@ impl From<PaymentAttemptUpdate> for PaymentAttemptUpdateInternal {
                 client_source,
                 client_version,
                 customer_acceptance,
-                ..Default::default()
+                net_amount: None,
+                connector_transaction_id: None,
+                amount_to_capture: None,
+                cancellation_reason: None,
+                mandate_id: None,
+                connector_metadata: None,
+                preprocessing_step_id: None,
+                error_reason: None,
+                connector_response_reference_id: None,
+                multiple_capture_count: None,
+                authentication_data: None,
+                encoded_data: None,
+                unified_code: None,
+                unified_message: None,
+                charge_id: None,
             },
             PaymentAttemptUpdate::VoidUpdate {
                 status,
@@ -666,8 +749,50 @@ impl From<PaymentAttemptUpdate> for PaymentAttemptUpdateInternal {
             } => Self {
                 status: Some(status),
                 cancellation_reason,
+                modified_at: common_utils::date_time::now(),
                 updated_by,
-                ..Default::default()
+                amount: None,
+                net_amount: None,
+                currency: None,
+                connector_transaction_id: None,
+                amount_to_capture: None,
+                connector: None,
+                authentication_type: None,
+                payment_method: None,
+                error_message: None,
+                payment_method_id: None,
+                mandate_id: None,
+                browser_info: None,
+                payment_token: None,
+                error_code: None,
+                connector_metadata: None,
+                payment_method_data: None,
+                payment_method_type: None,
+                payment_experience: None,
+                business_sub_label: None,
+                straight_through_algorithm: None,
+                preprocessing_step_id: None,
+                error_reason: None,
+                capture_method: None,
+                connector_response_reference_id: None,
+                multiple_capture_count: None,
+                surcharge_amount: None,
+                tax_amount: None,
+                amount_capturable: None,
+                merchant_connector_id: None,
+                authentication_data: None,
+                encoded_data: None,
+                unified_code: None,
+                unified_message: None,
+                external_three_ds_authentication_attempted: None,
+                authentication_connector: None,
+                authentication_id: None,
+                fingerprint_id: None,
+                payment_method_billing_address_id: None,
+                charge_id: None,
+                client_source: None,
+                client_version: None,
+                customer_acceptance: None,
             },
             PaymentAttemptUpdate::RejectUpdate {
                 status,
@@ -676,10 +801,51 @@ impl From<PaymentAttemptUpdate> for PaymentAttemptUpdateInternal {
                 updated_by,
             } => Self {
                 status: Some(status),
+                modified_at: common_utils::date_time::now(),
                 error_code,
                 error_message,
                 updated_by,
-                ..Default::default()
+                amount: None,
+                net_amount: None,
+                currency: None,
+                connector_transaction_id: None,
+                amount_to_capture: None,
+                connector: None,
+                authentication_type: None,
+                payment_method: None,
+                payment_method_id: None,
+                cancellation_reason: None,
+                mandate_id: None,
+                browser_info: None,
+                payment_token: None,
+                connector_metadata: None,
+                payment_method_data: None,
+                payment_method_type: None,
+                payment_experience: None,
+                business_sub_label: None,
+                straight_through_algorithm: None,
+                preprocessing_step_id: None,
+                error_reason: None,
+                capture_method: None,
+                connector_response_reference_id: None,
+                multiple_capture_count: None,
+                surcharge_amount: None,
+                tax_amount: None,
+                amount_capturable: None,
+                merchant_connector_id: None,
+                authentication_data: None,
+                encoded_data: None,
+                unified_code: None,
+                unified_message: None,
+                external_three_ds_authentication_attempted: None,
+                authentication_connector: None,
+                authentication_id: None,
+                fingerprint_id: None,
+                payment_method_billing_address_id: None,
+                charge_id: None,
+                client_source: None,
+                client_version: None,
+                customer_acceptance: None,
             },
             PaymentAttemptUpdate::BlocklistUpdate {
                 status,
@@ -688,20 +854,102 @@ impl From<PaymentAttemptUpdate> for PaymentAttemptUpdateInternal {
                 updated_by,
             } => Self {
                 status: Some(status),
+                modified_at: common_utils::date_time::now(),
                 error_code,
                 connector: Some(None),
                 error_message,
                 updated_by,
                 merchant_connector_id: Some(None),
-                ..Default::default()
+                amount: None,
+                net_amount: None,
+                currency: None,
+                connector_transaction_id: None,
+                amount_to_capture: None,
+                authentication_type: None,
+                payment_method: None,
+                payment_method_id: None,
+                cancellation_reason: None,
+                mandate_id: None,
+                browser_info: None,
+                payment_token: None,
+                connector_metadata: None,
+                payment_method_data: None,
+                payment_method_type: None,
+                payment_experience: None,
+                business_sub_label: None,
+                straight_through_algorithm: None,
+                preprocessing_step_id: None,
+                error_reason: None,
+                capture_method: None,
+                connector_response_reference_id: None,
+                multiple_capture_count: None,
+                surcharge_amount: None,
+                tax_amount: None,
+                amount_capturable: None,
+                authentication_data: None,
+                encoded_data: None,
+                unified_code: None,
+                unified_message: None,
+                external_three_ds_authentication_attempted: None,
+                authentication_connector: None,
+                authentication_id: None,
+                fingerprint_id: None,
+                payment_method_billing_address_id: None,
+                charge_id: None,
+                client_source: None,
+                client_version: None,
+                customer_acceptance: None,
             },
             PaymentAttemptUpdate::PaymentMethodDetailsUpdate {
                 payment_method_id,
                 updated_by,
             } => Self {
                 payment_method_id,
+                modified_at: common_utils::date_time::now(),
                 updated_by,
-                ..Default::default()
+                amount: None,
+                net_amount: None,
+                currency: None,
+                status: None,
+                connector_transaction_id: None,
+                amount_to_capture: None,
+                connector: None,
+                authentication_type: None,
+                payment_method: None,
+                error_message: None,
+                cancellation_reason: None,
+                mandate_id: None,
+                browser_info: None,
+                payment_token: None,
+                error_code: None,
+                connector_metadata: None,
+                payment_method_data: None,
+                payment_method_type: None,
+                payment_experience: None,
+                business_sub_label: None,
+                straight_through_algorithm: None,
+                preprocessing_step_id: None,
+                error_reason: None,
+                capture_method: None,
+                connector_response_reference_id: None,
+                multiple_capture_count: None,
+                surcharge_amount: None,
+                tax_amount: None,
+                amount_capturable: None,
+                merchant_connector_id: None,
+                authentication_data: None,
+                encoded_data: None,
+                unified_code: None,
+                unified_message: None,
+                external_three_ds_authentication_attempted: None,
+                authentication_connector: None,
+                authentication_id: None,
+                fingerprint_id: None,
+                payment_method_billing_address_id: None,
+                charge_id: None,
+                client_source: None,
+                client_version: None,
+                customer_acceptance: None,
             },
             PaymentAttemptUpdate::ResponseUpdate {
                 status,
@@ -730,7 +978,7 @@ impl From<PaymentAttemptUpdate> for PaymentAttemptUpdateInternal {
                 connector_transaction_id,
                 authentication_type,
                 payment_method_id,
-                modified_at: Some(common_utils::date_time::now()),
+                modified_at: common_utils::date_time::now(),
                 mandate_id,
                 connector_metadata,
                 error_code,
@@ -746,7 +994,31 @@ impl From<PaymentAttemptUpdate> for PaymentAttemptUpdateInternal {
                 unified_message,
                 payment_method_data,
                 charge_id,
-                ..Default::default()
+                amount: None,
+                net_amount: None,
+                currency: None,
+                amount_to_capture: None,
+                payment_method: None,
+                cancellation_reason: None,
+                browser_info: None,
+                payment_method_type: None,
+                payment_experience: None,
+                business_sub_label: None,
+                straight_through_algorithm: None,
+                preprocessing_step_id: None,
+                capture_method: None,
+                multiple_capture_count: None,
+                surcharge_amount: None,
+                tax_amount: None,
+                merchant_connector_id: None,
+                external_three_ds_authentication_attempted: None,
+                authentication_connector: None,
+                authentication_id: None,
+                fingerprint_id: None,
+                payment_method_billing_address_id: None,
+                client_source: None,
+                client_version: None,
+                customer_acceptance: None,
             },
             PaymentAttemptUpdate::ErrorUpdate {
                 connector,
@@ -766,7 +1038,7 @@ impl From<PaymentAttemptUpdate> for PaymentAttemptUpdateInternal {
                 status: Some(status),
                 error_message,
                 error_code,
-                modified_at: Some(common_utils::date_time::now()),
+                modified_at: common_utils::date_time::now(),
                 error_reason,
                 amount_capturable,
                 updated_by,
@@ -775,12 +1047,87 @@ impl From<PaymentAttemptUpdate> for PaymentAttemptUpdateInternal {
                 connector_transaction_id,
                 payment_method_data,
                 authentication_type,
-                ..Default::default()
+                amount: None,
+                net_amount: None,
+                currency: None,
+                amount_to_capture: None,
+                payment_method: None,
+                payment_method_id: None,
+                cancellation_reason: None,
+                mandate_id: None,
+                browser_info: None,
+                payment_token: None,
+                connector_metadata: None,
+                payment_method_type: None,
+                payment_experience: None,
+                business_sub_label: None,
+                straight_through_algorithm: None,
+                preprocessing_step_id: None,
+                capture_method: None,
+                connector_response_reference_id: None,
+                multiple_capture_count: None,
+                surcharge_amount: None,
+                tax_amount: None,
+                merchant_connector_id: None,
+                authentication_data: None,
+                encoded_data: None,
+                external_three_ds_authentication_attempted: None,
+                authentication_connector: None,
+                authentication_id: None,
+                fingerprint_id: None,
+                payment_method_billing_address_id: None,
+                charge_id: None,
+                client_source: None,
+                client_version: None,
+                customer_acceptance: None,
             },
             PaymentAttemptUpdate::StatusUpdate { status, updated_by } => Self {
                 status: Some(status),
+                modified_at: common_utils::date_time::now(),
                 updated_by,
-                ..Default::default()
+                amount: None,
+                net_amount: None,
+                currency: None,
+                connector_transaction_id: None,
+                amount_to_capture: None,
+                connector: None,
+                authentication_type: None,
+                payment_method: None,
+                error_message: None,
+                payment_method_id: None,
+                cancellation_reason: None,
+                mandate_id: None,
+                browser_info: None,
+                payment_token: None,
+                error_code: None,
+                connector_metadata: None,
+                payment_method_data: None,
+                payment_method_type: None,
+                payment_experience: None,
+                business_sub_label: None,
+                straight_through_algorithm: None,
+                preprocessing_step_id: None,
+                error_reason: None,
+                capture_method: None,
+                connector_response_reference_id: None,
+                multiple_capture_count: None,
+                surcharge_amount: None,
+                tax_amount: None,
+                amount_capturable: None,
+                merchant_connector_id: None,
+                authentication_data: None,
+                encoded_data: None,
+                unified_code: None,
+                unified_message: None,
+                external_three_ds_authentication_attempted: None,
+                authentication_connector: None,
+                authentication_id: None,
+                fingerprint_id: None,
+                payment_method_billing_address_id: None,
+                charge_id: None,
+                client_source: None,
+                client_version: None,
+                customer_acceptance: None,
             },
             PaymentAttemptUpdate::UpdateTrackers {
                 payment_token,
@@ -793,6 +1140,7 @@ impl From<PaymentAttemptUpdate> for PaymentAttemptUpdateInternal {
                 merchant_connector_id,
             } => Self {
                 payment_token,
+                modified_at: common_utils::date_time::now(),
                 connector: connector.map(Some),
                 straight_through_algorithm,
                 amount_capturable,
@@ -800,7 +1148,43 @@ impl From<PaymentAttemptUpdate> for PaymentAttemptUpdateInternal {
                 tax_amount,
                 updated_by,
                 merchant_connector_id: merchant_connector_id.map(Some),
-                ..Default::default()
+                amount: None,
+                net_amount: None,
+                currency: None,
+                status: None,
+                connector_transaction_id: None,
+                amount_to_capture: None,
+                authentication_type: None,
+                payment_method: None,
+                error_message: None,
+                payment_method_id: None,
+                cancellation_reason: None,
+                mandate_id: None,
+                browser_info: None,
+                error_code: None,
+                connector_metadata: None,
+                payment_method_data: None,
+                payment_method_type: None,
+                payment_experience: None,
+                business_sub_label: None,
+                preprocessing_step_id: None,
+                error_reason: None,
+                capture_method: None,
+                connector_response_reference_id: None,
+                multiple_capture_count: None,
+                authentication_data: None,
+                encoded_data: None,
+                unified_code: None,
+                unified_message: None,
+                external_three_ds_authentication_attempted: None,
+                authentication_connector: None,
+                authentication_id: None,
+                fingerprint_id: None,
+                payment_method_billing_address_id: None,
+                charge_id: None,
+                client_source: None,
+                client_version: None,
+                customer_acceptance: None,
             },
             PaymentAttemptUpdate::UnresolvedResponseUpdate {
                 status,
@@ -817,13 +1201,48 @@ impl From<PaymentAttemptUpdate> for PaymentAttemptUpdateInternal {
                 connector: connector.map(Some),
                 connector_transaction_id,
                 payment_method_id,
-                modified_at: Some(common_utils::date_time::now()),
+                modified_at: common_utils::date_time::now(),
                 error_code,
                 error_message,
                 error_reason,
                 connector_response_reference_id,
                 updated_by,
-                ..Default::default()
+                amount: None,
+                net_amount: None,
+                currency: None,
+                amount_to_capture: None,
+                authentication_type: None,
+                payment_method: None,
+                cancellation_reason: None,
+                mandate_id: None,
+                browser_info: None,
+                payment_token: None,
+                connector_metadata: None,
+                payment_method_data: None,
+                payment_method_type: None,
+                payment_experience: None,
+                business_sub_label: None,
+                straight_through_algorithm: None,
+                preprocessing_step_id: None,
+                capture_method: None,
+                multiple_capture_count: None,
+                surcharge_amount: None,
+                tax_amount: None,
+                amount_capturable: None,
+                merchant_connector_id: None,
+                authentication_data: None,
+                encoded_data: None,
+                unified_code: None,
+                unified_message: None,
+                external_three_ds_authentication_attempted: None,
+                authentication_connector: None,
+                authentication_id: None,
+                fingerprint_id: None,
+                payment_method_billing_address_id: None,
+                charge_id: None,
+                client_source: None,
+                client_version: None,
+                customer_acceptance: None,
             },
             PaymentAttemptUpdate::PreprocessingUpdate {
                 status,
@@ -836,13 +1255,50 @@ impl From<PaymentAttemptUpdate> for PaymentAttemptUpdateInternal {
             } => Self {
                 status: Some(status),
                 payment_method_id,
-                modified_at: Some(common_utils::date_time::now()),
+                modified_at: common_utils::date_time::now(),
                 connector_metadata,
                 preprocessing_step_id,
                 connector_transaction_id,
                 connector_response_reference_id,
                 updated_by,
-                ..Default::default()
+                amount: None,
+                net_amount: None,
+                currency: None,
+                amount_to_capture: None,
+                connector: None,
+                authentication_type: None,
+                payment_method: None,
+                error_message: None,
+                cancellation_reason: None,
+                mandate_id: None,
+                browser_info: None,
+                payment_token: None,
+                error_code: None,
+                payment_method_data: None,
+                payment_method_type: None,
+                payment_experience: None,
+                business_sub_label: None,
+                straight_through_algorithm: None,
+                error_reason: None,
+                capture_method: None,
+                multiple_capture_count: None,
+                surcharge_amount: None,
+                tax_amount: None,
+                amount_capturable: None,
+                merchant_connector_id: None,
+                authentication_data: None,
+                encoded_data: None,
+                unified_code: None,
+                unified_message: None,
+                external_three_ds_authentication_attempted: None,
+                authentication_connector: None,
+                authentication_id: None,
+                fingerprint_id: None,
+                payment_method_billing_address_id: None,
+                charge_id: None,
+                client_source: None,
+                client_version: None,
+                customer_acceptance: None,
             },
             PaymentAttemptUpdate::CaptureUpdate {
                 multiple_capture_count,
@@ -850,9 +1306,51 @@ impl From<PaymentAttemptUpdate> for PaymentAttemptUpdateInternal {
                 amount_to_capture,
             } => Self {
                 multiple_capture_count,
+                modified_at: common_utils::date_time::now(),
                 updated_by,
                 amount_to_capture,
-                ..Default::default()
+                amount: None,
+                net_amount: None,
+                currency: None,
+                status: None,
+                connector_transaction_id: None,
+                connector: None,
+                authentication_type: None,
+                payment_method: None,
+                error_message: None,
+                payment_method_id: None,
+                cancellation_reason: None,
+                mandate_id: None,
+                browser_info: None,
+                payment_token: None,
+                error_code: None,
+                connector_metadata: None,
+                payment_method_data: None,
+                payment_method_type: None,
+                payment_experience: None,
+                business_sub_label: None,
+                straight_through_algorithm: None,
+                preprocessing_step_id: None,
+                error_reason: None,
+                capture_method: None,
+                connector_response_reference_id: None,
+                surcharge_amount: None,
+                tax_amount: None,
+                amount_capturable: None,
+                merchant_connector_id: None,
+                authentication_data: None,
+                encoded_data: None,
+                unified_code: None,
+                unified_message: None,
+                external_three_ds_authentication_attempted: None,
+                authentication_connector: None,
+                authentication_id: None,
+                fingerprint_id: None,
+                payment_method_billing_address_id: None,
+                charge_id: None,
+                client_source: None,
+                client_version: None,
+                customer_acceptance: None,
             },
             PaymentAttemptUpdate::AmountToCaptureUpdate {
                 status,
@@ -860,9 +1358,51 @@ impl From<PaymentAttemptUpdate> for PaymentAttemptUpdateInternal {
                 updated_by,
             } => Self {
                 status: Some(status),
+                modified_at: common_utils::date_time::now(),
                 amount_capturable: Some(amount_capturable),
                 updated_by,
-                ..Default::default()
+                amount: None,
+                net_amount: None,
+                currency: None,
+                connector_transaction_id: None,
+                amount_to_capture: None,
+                connector: None,
+                authentication_type: None,
+                payment_method: None,
+                error_message: None,
+                payment_method_id: None,
+                cancellation_reason: None,
+                mandate_id: None,
+                browser_info: None,
+                payment_token: None,
+                error_code: None,
+                connector_metadata: None,
+                payment_method_data: None,
+                payment_method_type: None,
+                payment_experience: None,
+                business_sub_label: None,
+                straight_through_algorithm: None,
+                preprocessing_step_id: None,
+                error_reason: None,
+                capture_method: None,
+                connector_response_reference_id: None,
+                multiple_capture_count: None,
+                surcharge_amount: None,
+                tax_amount: None,
+                merchant_connector_id: None,
+                authentication_data: None,
+                encoded_data: None,
+                unified_code: None,
+                unified_message: None,
+                external_three_ds_authentication_attempted: None,
+                authentication_connector: None,
+                authentication_id: None,
+                fingerprint_id: None,
+                payment_method_billing_address_id: None,
+                charge_id: None,
+                client_source: None,
+                client_version: None,
+                customer_acceptance: None,
             },
             PaymentAttemptUpdate::ConnectorResponse {
                 authentication_data,
@@ -876,17 +1416,99 @@ impl From<PaymentAttemptUpdate> for PaymentAttemptUpdateInternal {
                 encoded_data,
                 connector_transaction_id,
                 connector: connector.map(Some),
+                modified_at: common_utils::date_time::now(),
                 updated_by,
                 charge_id,
-                ..Default::default()
+                amount: None,
+                net_amount: None,
+                currency: None,
+                status: None,
+                amount_to_capture: None,
+                authentication_type: None,
+                payment_method: None,
+                error_message: None,
+                payment_method_id: None,
+                cancellation_reason: None,
+                mandate_id: None,
+                browser_info: None,
+                payment_token: None,
+                error_code: None,
+                connector_metadata: None,
+                payment_method_data: None,
+                payment_method_type: None,
+                payment_experience: None,
+                business_sub_label: None,
+                straight_through_algorithm: None,
+                preprocessing_step_id: None,
+                error_reason: None,
+                capture_method: None,
+                connector_response_reference_id: None,
+                multiple_capture_count: None,
+                surcharge_amount: None,
+                tax_amount: None,
+                amount_capturable: None,
+                merchant_connector_id: None,
+                unified_code: None,
+                unified_message: None,
+                external_three_ds_authentication_attempted: None,
+                authentication_connector: None,
+                authentication_id: None,
+                fingerprint_id: None,
+                payment_method_billing_address_id: None,
+                client_source: None,
+                client_version: None,
+                customer_acceptance: None,
             },
             PaymentAttemptUpdate::IncrementalAuthorizationAmountUpdate {
                 amount,
                 amount_capturable,
             } => Self {
                 amount: Some(amount),
+                modified_at: common_utils::date_time::now(),
                 amount_capturable: Some(amount_capturable),
-                ..Default::default()
+                net_amount: None,
+                currency: None,
+                status: None,
+                connector_transaction_id: None,
+                amount_to_capture: None,
+                connector: None,
+                authentication_type: None,
+                payment_method: None,
+                error_message: None,
+                payment_method_id: None,
+                cancellation_reason: None,
+                mandate_id: None,
+                browser_info: None,
+                payment_token: None,
+                error_code: None,
+                connector_metadata: None,
+                payment_method_data: None,
+                payment_method_type: None,
+                payment_experience: None,
+                business_sub_label: None,
+                straight_through_algorithm: None,
+                preprocessing_step_id: None,
+                error_reason: None,
+                capture_method: None,
+                connector_response_reference_id: None,
+                multiple_capture_count: None,
+                surcharge_amount: None,
+                tax_amount: None,
+                updated_by: String::default(),
+                merchant_connector_id: None,
+                authentication_data: None,
+                encoded_data: None,
+                unified_code: None,
+                unified_message: None,
+                external_three_ds_authentication_attempted: None,
+                authentication_connector: None,
+                authentication_id: None,
+                fingerprint_id: None,
+                payment_method_billing_address_id: None,
+                charge_id: None,
+                client_source: None,
+                client_version: None,
+                customer_acceptance: None,
             },
             PaymentAttemptUpdate::AuthenticationUpdate {
                 status,
@@ -896,11 +1518,51 @@ impl From<PaymentAttemptUpdate> for PaymentAttemptUpdateInternal {
                 updated_by,
             } => Self {
                 status: Some(status),
+                modified_at: common_utils::date_time::now(),
                 external_three_ds_authentication_attempted,
                 authentication_connector,
                 authentication_id,
                 updated_by,
-                ..Default::default()
+                amount: None,
+                net_amount: None,
+                currency: None,
+                connector_transaction_id: None,
+                amount_to_capture: None,
+                connector: None,
+                authentication_type: None,
+                payment_method: None,
+                error_message: None,
+                payment_method_id: None,
+                cancellation_reason: None,
+                mandate_id: None,
+                browser_info: None,
+                payment_token: None,
+                error_code: None,
+                connector_metadata: None,
+                payment_method_data: None,
+                payment_method_type: None,
+                payment_experience: None,
+                business_sub_label: None,
+                straight_through_algorithm: None,
+                preprocessing_step_id: None,
+                error_reason: None,
+                capture_method: None,
+                connector_response_reference_id: None,
+                multiple_capture_count: None,
+                surcharge_amount: None,
+                tax_amount: None,
+                amount_capturable: None,
+                merchant_connector_id: None,
+                authentication_data: None,
+                encoded_data: None,
+                unified_code: None,
+                unified_message: None,
+                fingerprint_id: None,
+                payment_method_billing_address_id: None,
+                charge_id: None,
+                client_source: None,
+                client_version: None,
+                customer_acceptance: None,
             },
             PaymentAttemptUpdate::ManualUpdate {
                 status,
@@ -913,12 +1575,50 @@ impl From<PaymentAttemptUpdate> for PaymentAttemptUpdateInternal {
             } => Self {
                 status,
                 error_code: error_code.map(Some),
+                modified_at: common_utils::date_time::now(),
                 error_message: error_message.map(Some),
                 error_reason: error_reason.map(Some),
                 updated_by,
                 unified_code: unified_code.map(Some),
                 unified_message: unified_message.map(Some),
-                ..Default::default()
+                amount: None,
+                net_amount: None,
+                currency: None,
+                connector_transaction_id: None,
+                amount_to_capture: None,
+                connector: None,
+                authentication_type: None,
+                payment_method: None,
+                payment_method_id: None,
+                cancellation_reason: None,
+                mandate_id: None,
+                browser_info: None,
+                payment_token: None,
+                connector_metadata: None,
+                payment_method_data: None,
+                payment_method_type: None,
+                payment_experience: None,
+                business_sub_label: None,
+                straight_through_algorithm: None,
+                preprocessing_step_id: None,
+                capture_method: None,
+                connector_response_reference_id: None,
+                multiple_capture_count: None,
+                surcharge_amount: None,
+                tax_amount: None,
+                amount_capturable: None,
+                merchant_connector_id: None,
+                authentication_data: None,
+                encoded_data: None,
+                external_three_ds_authentication_attempted: None,
+                authentication_connector: None,
+                authentication_id: None,
+                fingerprint_id: None,
+                payment_method_billing_address_id: None,
+                charge_id: None,
+                client_source: None,
+                client_version: None,
+                customer_acceptance: None,
             },
         }
     }
diff --git a/crates/diesel_models/src/payment_intent.rs b/crates/diesel_models/src/payment_intent.rs
index 0272f8fec14..8deca44253a 100644
--- a/crates/diesel_models/src/payment_intent.rs
+++ b/crates/diesel_models/src/payment_intent.rs
@@ -1,13 +1,13 @@
 use common_enums::RequestIncrementalAuthorization;
 use common_utils::{id_type, pii, types::MinorUnit};
-use diesel::{AsChangeset, Identifiable, Insertable, Queryable};
+use diesel::{AsChangeset, Identifiable, Insertable, Queryable, Selectable};
 use serde::{Deserialize, Serialize};
 use time::PrimitiveDateTime;
 
 use crate::{encryption::Encryption, enums as storage_enums, schema::payment_intent};
 
-#[derive(Clone, Debug, PartialEq, Identifiable, Queryable, Serialize, Deserialize)]
-#[diesel(table_name = payment_intent, primary_key(payment_id, merchant_id))]
+#[derive(Clone, Debug, PartialEq, Identifiable, Queryable, Selectable, Serialize, Deserialize)]
+#[diesel(table_name = payment_intent, primary_key(payment_id, merchant_id), check_for_backend(diesel::pg::Pg))]
 pub struct PaymentIntent {
     pub payment_id: String,
     pub merchant_id: String,
@@ -85,10 +85,10 @@ pub struct PaymentIntentNew {
     pub billing_address_id: Option<String>,
     pub statement_descriptor_name: Option<String>,
     pub statement_descriptor_suffix: Option<String>,
-    #[serde(default, with = "common_utils::custom_serde::iso8601::option")]
-    pub created_at: Option<PrimitiveDateTime>,
-    #[serde(default, with = "common_utils::custom_serde::iso8601::option")]
-    pub modified_at: Option<PrimitiveDateTime>,
+    #[serde(with = "common_utils::custom_serde::iso8601")]
+    pub created_at: PrimitiveDateTime,
+    #[serde(with = "common_utils::custom_serde::iso8601")]
+    pub modified_at: PrimitiveDateTime,
     #[serde(default, with = "common_utils::custom_serde::iso8601::option")]
     pub last_synced: Option<PrimitiveDateTime>,
     pub setup_future_usage: Option<storage_enums::FutureUsage>,
@@ -228,7 +228,7 @@ pub struct PaymentIntentUpdateFields {
     pub shipping_details: Option<Encryption>,
 }
 
-#[derive(Clone, Debug, Default, AsChangeset, router_derive::DebugAsDisplay)]
+#[derive(Clone, Debug, AsChangeset, router_derive::DebugAsDisplay)]
 #[diesel(table_name = payment_intent)]
 pub struct PaymentIntentUpdateInternal {
     pub amount: Option<MinorUnit>,
@@ -242,7 +242,7 @@ pub struct PaymentIntentUpdateInternal {
     pub metadata: Option<serde_json::Value>,
     pub billing_address_id: Option<String>,
     pub shipping_address_id: Option<String>,
-    pub modified_at: Option<PrimitiveDateTime>,
+    pub modified_at: PrimitiveDateTime,
     pub active_attempt_id: Option<String>,
     pub business_country: Option<storage_enums::CountryAlpha2>,
     pub business_label: Option<String>,
@@ -360,9 +360,39 @@ impl From<PaymentIntentUpdate> for PaymentIntentUpdateInternal {
                 updated_by,
             } => Self {
                 metadata: Some(metadata),
-                modified_at: Some(common_utils::date_time::now()),
+                modified_at: common_utils::date_time::now(),
                 updated_by,
-                ..Default::default()
+                amount: None,
+                currency: None,
+                status: None,
+                amount_captured: None,
+                customer_id: None,
+                return_url: None,
+                setup_future_usage: None,
+                off_session: None,
+                billing_address_id: None,
+                shipping_address_id: None,
+                active_attempt_id: None,
+                business_country: None,
+                business_label: None,
+                description: None,
+                statement_descriptor_name: None,
+                statement_descriptor_suffix: None,
+                order_details: None,
+                attempt_count: None,
+                merchant_decision: None,
+                payment_confirm_source: None,
+                surcharge_applicable: None,
+                incremental_authorization_allowed: None,
+                authorization_count: None,
+                session_expiry: None,
+                fingerprint_id: None,
+                request_external_three_ds_authentication: None,
+                frm_metadata: None,
+                customer_details: None,
+                billing_details: None,
+                merchant_order_reference_id: None,
+                shipping_details: None,
             },
             PaymentIntentUpdate::Update(value) => Self {
                 amount: Some(value.amount),
@@ -391,7 +421,15 @@ impl From<PaymentIntentUpdate> for PaymentIntentUpdateInternal {
                 billing_details: value.billing_details,
                 merchant_order_reference_id: value.merchant_order_reference_id,
                 shipping_details: value.shipping_details,
-                ..Default::default()
+                amount_captured: None,
+                off_session: None,
+                modified_at: common_utils::date_time::now(),
+                active_attempt_id: None,
+                attempt_count: None,
+                merchant_decision: None,
+                surcharge_applicable: None,
+                incremental_authorization_allowed: None,
+                authorization_count: None,
             },
             PaymentIntentUpdate::PaymentCreateUpdate {
                 return_url,
@@ -408,9 +446,34 @@ impl From<PaymentIntentUpdate> for PaymentIntentUpdateInternal {
                 shipping_address_id,
                 billing_address_id,
                 customer_details,
-                modified_at: Some(common_utils::date_time::now()),
+                modified_at: common_utils::date_time::now(),
                 updated_by,
-                ..Default::default()
+                amount: None,
+                currency: None,
+                amount_captured: None,
+                setup_future_usage: None,
+                off_session: None,
+                metadata: None,
+                active_attempt_id: None,
+                business_country: None,
+                business_label: None,
+                description: None,
+                statement_descriptor_name: None,
+                statement_descriptor_suffix: None,
+                order_details: None,
+                attempt_count: None,
+                merchant_decision: None,
+                payment_confirm_source: None,
+                surcharge_applicable: None,
+                incremental_authorization_allowed: None,
+                authorization_count: None,
+                session_expiry: None,
+                fingerprint_id: None,
+                request_external_three_ds_authentication: None,
+                frm_metadata: None,
+                billing_details: None,
+                merchant_order_reference_id: None,
+                shipping_details: None,
             },
             PaymentIntentUpdate::PGStatusUpdate {
                 status,
@@ -418,10 +481,39 @@ impl From<PaymentIntentUpdate> for PaymentIntentUpdateInternal {
                 incremental_authorization_allowed,
             } => Self {
                 status: Some(status),
-                modified_at: Some(common_utils::date_time::now()),
+                modified_at: common_utils::date_time::now(),
                 updated_by,
                 incremental_authorization_allowed,
-                ..Default::default()
+                amount: None,
+                currency: None,
+                amount_captured: None,
+                customer_id: None,
+                return_url: None,
+                setup_future_usage: None,
+                off_session: None,
+                metadata: None,
+                billing_address_id: None,
+                shipping_address_id: None,
+                active_attempt_id: None,
+                business_country: None,
+                business_label: None,
+                description: None,
+                statement_descriptor_name: None,
+                statement_descriptor_suffix: None,
+                order_details: None,
+                attempt_count: None,
+                merchant_decision: None,
+                payment_confirm_source: None,
+                surcharge_applicable: None,
+                authorization_count: None,
+                session_expiry: None,
+                fingerprint_id: None,
+                request_external_three_ds_authentication: None,
+                frm_metadata: None,
+                customer_details: None,
+                billing_details: None,
+                merchant_order_reference_id: None,
+                shipping_details: None,
             },
             PaymentIntentUpdate::MerchantStatusUpdate {
                 status,
@@ -432,9 +524,37 @@ impl From<PaymentIntentUpdate> for PaymentIntentUpdateInternal {
                 status: Some(status),
                 shipping_address_id,
                 billing_address_id,
-                modified_at: Some(common_utils::date_time::now()),
+                modified_at: common_utils::date_time::now(),
                 updated_by,
-                ..Default::default()
+                amount: None,
+                currency: None,
+                amount_captured: None,
+                customer_id: None,
+                return_url: None,
+                setup_future_usage: None,
+                off_session: None,
+                metadata: None,
+                active_attempt_id: None,
+                business_country: None,
+                business_label: None,
+                description: None,
+                statement_descriptor_name: None,
+                statement_descriptor_suffix: None,
+                order_details: None,
+                attempt_count: None,
+                merchant_decision: None,
+                payment_confirm_source: None,
+                surcharge_applicable: None,
+                incremental_authorization_allowed: None,
+                authorization_count: None,
+                session_expiry: None,
+                fingerprint_id: None,
+                request_external_three_ds_authentication: None,
+                frm_metadata: None,
+                customer_details: None,
+                billing_details: None,
+                merchant_order_reference_id: None,
+                shipping_details: None,
             },
             PaymentIntentUpdate::ResponseUpdate {
                 // amount,
@@ -454,10 +574,36 @@ impl From<PaymentIntentUpdate> for PaymentIntentUpdateInternal {
                 fingerprint_id,
                 // customer_id,
                 return_url,
-                modified_at: Some(common_utils::date_time::now()),
+                modified_at: common_utils::date_time::now(),
                 updated_by,
                 incremental_authorization_allowed,
-                ..Default::default()
+                amount: None,
+                currency: None,
+                customer_id: None,
+                setup_future_usage: None,
+                off_session: None,
+                metadata: None,
+                billing_address_id: None,
+                shipping_address_id: None,
+                active_attempt_id: None,
+                business_country: None,
+                business_label: None,
+                description: None,
+                statement_descriptor_name: None,
+                statement_descriptor_suffix: None,
+                order_details: None,
+                attempt_count: None,
+                merchant_decision: None,
+                payment_confirm_source: None,
+                surcharge_applicable: None,
+                authorization_count: None,
+                session_expiry: None,
+                request_external_three_ds_authentication: None,
+                frm_metadata: None,
+                customer_details: None,
+                billing_details: None,
+                merchant_order_reference_id: None,
+                shipping_details: None,
             },
             PaymentIntentUpdate::PaymentAttemptAndAttemptCountUpdate {
                 active_attempt_id,
@@ -467,7 +613,37 @@ impl From<PaymentIntentUpdate> for PaymentIntentUpdateInternal {
                 active_attempt_id: Some(active_attempt_id),
                 attempt_count: Some(attempt_count),
                 updated_by,
-                ..Default::default()
+                amount: None,
+                currency: None,
+                status: None,
+                amount_captured: None,
+                customer_id: None,
+                return_url: None,
+                setup_future_usage: None,
+                off_session: None,
+                metadata: None,
+                billing_address_id: None,
+                shipping_address_id: None,
+                modified_at: common_utils::date_time::now(),
+                business_country: None,
+                business_label: None,
+                description: None,
+                statement_descriptor_name: None,
+                statement_descriptor_suffix: None,
+                order_details: None,
+                merchant_decision: None,
+                payment_confirm_source: None,
+                surcharge_applicable: None,
+                incremental_authorization_allowed: None,
+                authorization_count: None,
+                session_expiry: None,
+                fingerprint_id: None,
+                request_external_three_ds_authentication: None,
+                frm_metadata: None,
+                customer_details: None,
+                billing_details: None,
+                merchant_order_reference_id: None,
+                shipping_details: None,
             },
             PaymentIntentUpdate::StatusAndAttemptUpdate {
                 status,
@@ -479,7 +655,36 @@ impl From<PaymentIntentUpdate> for PaymentIntentUpdateInternal {
                 active_attempt_id: Some(active_attempt_id),
                 attempt_count: Some(attempt_count),
                 updated_by,
-                ..Default::default()
+                amount: None,
+                currency: None,
+                amount_captured: None,
+                customer_id: None,
+                return_url: None,
+                setup_future_usage: None,
+                off_session: None,
+                metadata: None,
+                billing_address_id: None,
+                shipping_address_id: None,
+                modified_at: common_utils::date_time::now(),
+                business_country: None,
+                business_label: None,
+                description: None,
+                statement_descriptor_name: None,
+                statement_descriptor_suffix: None,
+                order_details: None,
+                merchant_decision: None,
+                payment_confirm_source: None,
+                surcharge_applicable: None,
+                incremental_authorization_allowed: None,
+                authorization_count: None,
+                session_expiry: None,
+                fingerprint_id: None,
+                request_external_three_ds_authentication: None,
+                frm_metadata: None,
+                customer_details: None,
+                billing_details: None,
+                merchant_order_reference_id: None,
+                shipping_details: None,
             },
             PaymentIntentUpdate::ApproveUpdate {
                 status,
@@ -489,7 +694,37 @@ impl From<PaymentIntentUpdate> for PaymentIntentUpdateInternal {
                 status: Some(status),
                 merchant_decision,
                 updated_by,
-                ..Default::default()
+                amount: None,
+                currency: None,
+                amount_captured: None,
+                customer_id: None,
+                return_url: None,
+                setup_future_usage: None,
+                off_session: None,
+                metadata: None,
+                billing_address_id: None,
+                shipping_address_id: None,
+                modified_at: common_utils::date_time::now(),
+                active_attempt_id: None,
+                business_country: None,
+                business_label: None,
+                description: None,
+                statement_descriptor_name: None,
+                statement_descriptor_suffix: None,
+                order_details: None,
+                attempt_count: None,
+                payment_confirm_source: None,
+                surcharge_applicable: None,
+                incremental_authorization_allowed: None,
+                authorization_count: None,
+                session_expiry: None,
+                fingerprint_id: None,
+                request_external_three_ds_authentication: None,
+                frm_metadata: None,
+                customer_details: None,
+                billing_details: None,
+                merchant_order_reference_id: None,
+                shipping_details: None,
             },
             PaymentIntentUpdate::RejectUpdate {
                 status,
@@ -499,7 +734,37 @@ impl From<PaymentIntentUpdate> for PaymentIntentUpdateInternal {
                 status: Some(status),
                 merchant_decision,
                 updated_by,
-                ..Default::default()
+                amount: None,
+                currency: None,
+                amount_captured: None,
+                customer_id: None,
+                return_url: None,
+                setup_future_usage: None,
+                off_session: None,
+                metadata: None,
+                billing_address_id: None,
+                shipping_address_id: None,
+                modified_at: common_utils::date_time::now(),
+                active_attempt_id: None,
+                business_country: None,
+                business_label: None,
+                description: None,
+                statement_descriptor_name: None,
+                statement_descriptor_suffix: None,
+                order_details: None,
+                attempt_count: None,
+                payment_confirm_source: None,
+                surcharge_applicable: None,
+                incremental_authorization_allowed: None,
+                authorization_count: None,
+                session_expiry: None,
+                fingerprint_id: None,
+                request_external_three_ds_authentication: None,
+                frm_metadata: None,
+                customer_details: None,
+                billing_details: None,
+                merchant_order_reference_id: None,
+                shipping_details: None,
             },
             PaymentIntentUpdate::SurchargeApplicableUpdate {
                 surcharge_applicable,
@@ -507,28 +772,186 @@ impl From<PaymentIntentUpdate> for PaymentIntentUpdateInternal {
             } => Self {
                 surcharge_applicable,
                 updated_by,
-                ..Default::default()
+                amount: None,
+                currency: None,
+                status: None,
+                amount_captured: None,
+                customer_id: None,
+                return_url: None,
+                setup_future_usage: None,
+                off_session: None,
+                metadata: None,
+                billing_address_id: None,
+                shipping_address_id: None,
+                modified_at: common_utils::date_time::now(),
+                active_attempt_id: None,
+                business_country: None,
+                business_label: None,
+                description: None,
+                statement_descriptor_name: None,
+                statement_descriptor_suffix: None,
+                order_details: None,
+                attempt_count: None,
+                merchant_decision: None,
+                payment_confirm_source: None,
+                incremental_authorization_allowed: None,
+                authorization_count: None,
+                session_expiry: None,
+                fingerprint_id: None,
+                request_external_three_ds_authentication: None,
+                frm_metadata: None,
+                customer_details: None,
+                billing_details: None,
+                merchant_order_reference_id: None,
+                shipping_details: None,
             },
             PaymentIntentUpdate::IncrementalAuthorizationAmountUpdate { amount } => Self {
                 amount: Some(amount),
-                ..Default::default()
+                currency: None,
+                status: None,
+                amount_captured: None,
+                customer_id: None,
+                return_url: None,
+                setup_future_usage: None,
+                off_session: None,
+                metadata: None,
+                billing_address_id: None,
+                shipping_address_id: None,
+                modified_at: common_utils::date_time::now(),
+                active_attempt_id: None,
+                business_country: None,
+                business_label: None,
+                description: None,
+                statement_descriptor_name: None,
+                statement_descriptor_suffix: None,
+                order_details: None,
+                attempt_count: None,
+                merchant_decision: None,
+                payment_confirm_source: None,
+                updated_by: String::default(),
+                surcharge_applicable: None,
+                incremental_authorization_allowed: None,
+                authorization_count: None,
+                session_expiry: None,
+                fingerprint_id: None,
+                request_external_three_ds_authentication: None,
+                frm_metadata: None,
+                customer_details: None,
+                billing_details: None,
+                merchant_order_reference_id: None,
+                shipping_details: None,
             },
             PaymentIntentUpdate::AuthorizationCountUpdate {
                 authorization_count,
             } => Self {
                 authorization_count: Some(authorization_count),
-                ..Default::default()
+                amount: None,
+                currency: None,
+                status: None,
+                amount_captured: None,
+                customer_id: None,
+                return_url: None,
+                setup_future_usage: None,
+                off_session: None,
+                metadata: None,
+                billing_address_id: None,
+                shipping_address_id: None,
+                modified_at: common_utils::date_time::now(),
+                active_attempt_id: None,
+                business_country: None,
+                business_label: None,
+                description: None,
+                statement_descriptor_name: None,
+                statement_descriptor_suffix: None,
+                order_details: None,
+                attempt_count: None,
+                merchant_decision: None,
+                payment_confirm_source: None,
+                updated_by: String::default(),
+                surcharge_applicable: None,
+                incremental_authorization_allowed: None,
+                session_expiry: None,
+                fingerprint_id: None,
+                request_external_three_ds_authentication: None,
+                frm_metadata: None,
+                customer_details: None,
+                billing_details: None,
+                merchant_order_reference_id: None,
+                shipping_details: None,
             },
             PaymentIntentUpdate::CompleteAuthorizeUpdate {
                 shipping_address_id,
             } => Self {
                 shipping_address_id,
-                ..Default::default()
+                amount: None,
+                currency: None,
+                status: None,
+                amount_captured: None,
+                customer_id: None,
+                return_url: None,
+                setup_future_usage: None,
+                off_session: None,
+                metadata: None,
+                billing_address_id: None,
+                modified_at: common_utils::date_time::now(),
+                active_attempt_id: None,
+                business_country: None,
+                business_label: None,
+                description: None,
+                statement_descriptor_name: None,
+                statement_descriptor_suffix: None,
+                order_details: None,
+                attempt_count: None,
+                merchant_decision: None,
+                payment_confirm_source: None,
+                updated_by: String::default(),
+                surcharge_applicable: None,
+                incremental_authorization_allowed: None,
+                authorization_count: None,
+                session_expiry: None,
+                fingerprint_id: None,
+                request_external_three_ds_authentication: None,
+                frm_metadata: None,
+                customer_details: None,
+                billing_details: None,
+                merchant_order_reference_id: None,
+                shipping_details: None,
             },
             PaymentIntentUpdate::ManualUpdate { status, updated_by } => Self {
                 status,
                 updated_by,
-                ..Default::default()
+                amount: None,
+                currency: None,
+                amount_captured: None,
+                customer_id: None,
+                return_url: None,
+                setup_future_usage: None,
+                off_session: None,
+                metadata: None,
+                billing_address_id: None,
+                shipping_address_id: None,
+                modified_at: common_utils::date_time::now(),
+                active_attempt_id: None,
+                business_country: None,
+                business_label: None,
+                description: None,
+                statement_descriptor_name: None,
+                statement_descriptor_suffix: None,
+                order_details: None,
+                attempt_count: None,
+                merchant_decision: None,
+                payment_confirm_source: None,
+                surcharge_applicable: None,
+                incremental_authorization_allowed: None,
+                authorization_count: None,
+                session_expiry: None,
+                fingerprint_id: None,
+                request_external_three_ds_authentication: None,
+                frm_metadata: None,
+                customer_details: None,
+                billing_details: None,
+                merchant_order_reference_id: None,
+                shipping_details: None,
             },
         }
     }
diff --git a/crates/diesel_models/src/payment_link.rs b/crates/diesel_models/src/payment_link.rs
index f4630c75d72..7937d2fbe30 100644
--- a/crates/diesel_models/src/payment_link.rs
+++ b/crates/diesel_models/src/payment_link.rs
@@ -1,13 +1,12 @@
 use common_utils::types::MinorUnit;
-use diesel::{Identifiable, Insertable, Queryable};
+use diesel::{Identifiable, Insertable, Queryable, Selectable};
 use serde::{self, Deserialize, Serialize};
 use time::PrimitiveDateTime;
 
 use crate::{enums as storage_enums, schema::payment_link};
 
-#[derive(Clone, Debug, Identifiable, Queryable, Serialize, Deserialize)]
-#[diesel(table_name = payment_link)]
-#[diesel(primary_key(payment_link_id))]
+#[derive(Clone, Debug, Identifiable, Queryable, Selectable, Serialize, Deserialize)]
+#[diesel(table_name = payment_link, primary_key(payment_link_id), check_for_backend(diesel::pg::Pg))]
 pub struct PaymentLink {
     pub payment_link_id: String,
     pub payment_id: String,
diff --git a/crates/diesel_models/src/payment_method.rs b/crates/diesel_models/src/payment_method.rs
index 16e8ddeb7d5..a9db90abb20 100644
--- a/crates/diesel_models/src/payment_method.rs
+++ b/crates/diesel_models/src/payment_method.rs
@@ -1,14 +1,16 @@
 use common_enums::MerchantStorageScheme;
 use common_utils::{id_type, pii};
-use diesel::{AsChangeset, Identifiable, Insertable, Queryable};
+use diesel::{AsChangeset, Identifiable, Insertable, Queryable, Selectable};
 use masking::Secret;
 use serde::{Deserialize, Serialize};
 use time::PrimitiveDateTime;
 
 use crate::{encryption::Encryption, enums as storage_enums, schema::payment_methods};
 
-#[derive(Clone, Debug, Eq, PartialEq, Identifiable, Queryable, Serialize, Deserialize)]
-#[diesel(table_name = payment_methods)]
+#[derive(
+    Clone, Debug, Eq, PartialEq, Identifiable, Queryable, Selectable, Serialize, Deserialize,
+)]
+#[diesel(table_name = payment_methods, check_for_backend(diesel::pg::Pg))]
 pub struct PaymentMethod {
     pub id: i32,
     pub customer_id: id_type::CustomerId,
diff --git a/crates/diesel_models/src/payout_attempt.rs b/crates/diesel_models/src/payout_attempt.rs
index 68c99d5ac08..9eb2a5a59db 100644
--- a/crates/diesel_models/src/payout_attempt.rs
+++ b/crates/diesel_models/src/payout_attempt.rs
@@ -1,13 +1,14 @@
 use common_utils::id_type;
-use diesel::{AsChangeset, Identifiable, Insertable, Queryable};
+use diesel::{AsChangeset, Identifiable, Insertable, Queryable, Selectable};
 use serde::{self, Deserialize, Serialize};
 use time::PrimitiveDateTime;
 
 use crate::{enums as storage_enums, schema::payout_attempt};
 
-#[derive(Clone, Debug, Eq, PartialEq, Identifiable, Queryable, Serialize, Deserialize)]
-#[diesel(table_name = payout_attempt)]
-#[diesel(primary_key(payout_attempt_id))]
+#[derive(
+    Clone, Debug, Eq, PartialEq, Identifiable, Queryable, Selectable, Serialize, Deserialize,
+)]
+#[diesel(table_name = payout_attempt, primary_key(payout_attempt_id), check_for_backend(diesel::pg::Pg))]
 pub struct PayoutAttempt {
     pub payout_attempt_id: String,
     pub payout_id: String,
diff --git a/crates/diesel_models/src/payouts.rs b/crates/diesel_models/src/payouts.rs
index 5cb06d7755b..acef00b15d2 100644
--- a/crates/diesel_models/src/payouts.rs
+++ b/crates/diesel_models/src/payouts.rs
@@ -1,14 +1,15 @@
 use common_utils::{id_type, pii, types::MinorUnit};
-use diesel::{AsChangeset, Identifiable, Insertable, Queryable};
+use diesel::{AsChangeset, Identifiable, Insertable, Queryable, Selectable};
 use serde::{self, Deserialize, Serialize};
 use time::PrimitiveDateTime;
 
 use crate::{enums as storage_enums, schema::payouts};
 
 // Payouts
-#[derive(Clone, Debug, Eq, PartialEq, Identifiable, Queryable, Serialize, Deserialize)]
-#[diesel(table_name = payouts)]
-#[diesel(primary_key(payout_id))]
+#[derive(
+    Clone, Debug, Eq, PartialEq, Identifiable, Queryable, Selectable, Serialize, Deserialize,
+)]
+#[diesel(table_name = payouts, primary_key(payout_id), check_for_backend(diesel::pg::Pg))]
 pub struct Payouts {
     pub payout_id: String,
     pub merchant_id: String,
@@ -66,10 +67,10 @@ pub struct PayoutsNew {
     pub return_url: Option<String>,
     pub entity_type: storage_enums::PayoutEntityType,
     pub metadata: Option<pii::SecretSerdeValue>,
-    #[serde(default, with = "common_utils::custom_serde::iso8601::option")]
-    pub created_at: Option<PrimitiveDateTime>,
-    #[serde(default, with = "common_utils::custom_serde::iso8601::option")]
-    pub last_modified_at: Option<PrimitiveDateTime>,
+    #[serde(with = "common_utils::custom_serde::iso8601")]
+    pub created_at: PrimitiveDateTime,
+    #[serde(with = "common_utils::custom_serde::iso8601")]
+    pub last_modified_at: PrimitiveDateTime,
     pub attempt_count: i16,
     pub profile_id: String,
     pub status: storage_enums::PayoutStatus,
diff --git a/crates/diesel_models/src/process_tracker.rs b/crates/diesel_models/src/process_tracker.rs
index 342ad8453af..cd2c429c55e 100644
--- a/crates/diesel_models/src/process_tracker.rs
+++ b/crates/diesel_models/src/process_tracker.rs
@@ -1,5 +1,5 @@
 use common_utils::ext_traits::Encode;
-use diesel::{AsChangeset, Identifiable, Insertable, Queryable};
+use diesel::{AsChangeset, Identifiable, Insertable, Queryable, Selectable};
 use error_stack::ResultExt;
 use serde::{Deserialize, Serialize};
 use time::PrimitiveDateTime;
@@ -14,10 +14,11 @@ use crate::{enums as storage_enums, errors, schema::process_tracker, StorageResu
     Deserialize,
     Identifiable,
     Queryable,
+    Selectable,
     Serialize,
     router_derive::DebugAsDisplay,
 )]
-#[diesel(table_name = process_tracker)]
+#[diesel(table_name = process_tracker, check_for_backend(diesel::pg::Pg))]
 pub struct ProcessTracker {
     pub id: String,
     pub name: Option<String>,
diff --git a/crates/diesel_models/src/refund.rs b/crates/diesel_models/src/refund.rs
index 44d6133d8fb..a3e767fdb32 100644
--- a/crates/diesel_models/src/refund.rs
+++ b/crates/diesel_models/src/refund.rs
@@ -2,16 +2,24 @@ use common_utils::{
     pii,
     types::{ChargeRefunds, MinorUnit},
 };
-use diesel::{AsChangeset, Identifiable, Insertable, Queryable};
+use diesel::{AsChangeset, Identifiable, Insertable, Queryable, Selectable};
 use serde::{Deserialize, Serialize};
 use time::PrimitiveDateTime;
 
 use crate::{enums as storage_enums, schema::refund};
 
 #[derive(
-    Clone, Debug, Eq, Identifiable, Queryable, PartialEq, serde::Serialize, serde::Deserialize,
+    Clone,
+    Debug,
+    Eq,
+    Identifiable,
+    Queryable,
+    Selectable,
+    PartialEq,
+    serde::Serialize,
+    serde::Deserialize,
 )]
-#[diesel(table_name = refund)]
+#[diesel(table_name = refund, check_for_backend(diesel::pg::Pg))]
 pub struct Refund {
     pub id: i32,
     pub internal_reference_id: String,
@@ -34,7 +42,7 @@ pub struct Refund {
     #[serde(with = "common_utils::custom_serde::iso8601")]
     pub created_at: PrimitiveDateTime,
     #[serde(with = "common_utils::custom_serde::iso8601")]
-    pub updated_at: PrimitiveDateTime,
+    pub modified_at: PrimitiveDateTime,
     pub description: Option<String>,
     pub attempt_id: String,
     pub refund_reason: Option<String>,
@@ -48,7 +56,6 @@ pub struct Refund {
 #[derive(
     Clone,
     Debug,
-    Default,
     Eq,
     PartialEq,
     Insertable,
@@ -75,10 +82,10 @@ pub struct RefundNew {
     pub sent_to_gateway: bool,
     pub metadata: Option<pii::SecretSerdeValue>,
     pub refund_arn: Option<String>,
-    #[serde(default, with = "common_utils::custom_serde::iso8601::option")]
-    pub created_at: Option<PrimitiveDateTime>,
-    #[serde(default, with = "common_utils::custom_serde::iso8601::option")]
-    pub modified_at: Option<PrimitiveDateTime>,
+    #[serde(with = "common_utils::custom_serde::iso8601")]
+    pub created_at: PrimitiveDateTime,
+    #[serde(with = "common_utils::custom_serde::iso8601")]
+    pub modified_at: PrimitiveDateTime,
     pub description: Option<String>,
     pub attempt_id: String,
     pub refund_reason: Option<String>,
@@ -88,6 +95,38 @@ pub struct RefundNew {
     pub charges: Option<ChargeRefunds>,
 }
 
+impl Default for RefundNew {
+    fn default() -> Self {
+        Self {
+            refund_id: Default::default(),
+            payment_id: Default::default(),
+            merchant_id: Default::default(),
+            internal_reference_id: Default::default(),
+            external_reference_id: Default::default(),
+            connector_transaction_id: Default::default(),
+            connector: Default::default(),
+            connector_refund_id: Default::default(),
+            refund_type: Default::default(),
+            total_amount: Default::default(),
+            currency: Default::default(),
+            refund_amount: Default::default(),
+            refund_status: Default::default(),
+            sent_to_gateway: Default::default(),
+            metadata: Default::default(),
+            refund_arn: Default::default(),
+            created_at: common_utils::date_time::now(),
+            modified_at: common_utils::date_time::now(),
+            description: Default::default(),
+            attempt_id: Default::default(),
+            refund_reason: Default::default(),
+            profile_id: Default::default(),
+            updated_by: Default::default(),
+            merchant_connector_id: Default::default(),
+            charges: Default::default(),
+        }
+    }
+}
+
 #[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
 pub enum RefundUpdate {
     Update {
@@ -124,7 +163,7 @@ pub enum RefundUpdate {
     },
 }
 
-#[derive(Clone, Debug, Default, AsChangeset, router_derive::DebugAsDisplay)]
+#[derive(Clone, Debug, AsChangeset, router_derive::DebugAsDisplay)]
 #[diesel(table_name = refund)]
 pub struct RefundUpdateInternal {
     connector_refund_id: Option<String>,
@@ -136,6 +175,7 @@ pub struct RefundUpdateInternal {
     refund_reason: Option<String>,
     refund_error_code: Option<String>,
     updated_by: String,
+    modified_at: PrimitiveDateTime,
 }
 
 impl RefundUpdateInternal {
@@ -150,6 +190,7 @@ impl RefundUpdateInternal {
             refund_reason: self.refund_reason,
             refund_error_code: self.refund_error_code,
             updated_by: self.updated_by,
+            modified_at: self.modified_at,
             ..source
         }
     }
@@ -172,7 +213,10 @@ impl From<RefundUpdate> for RefundUpdateInternal {
                 refund_error_message,
                 refund_arn: Some(refund_arn),
                 updated_by,
-                ..Default::default()
+                metadata: None,
+                refund_reason: None,
+                refund_error_code: None,
+                modified_at: common_utils::date_time::now(),
             },
             RefundUpdate::MetadataAndReasonUpdate {
                 metadata,
@@ -182,7 +226,13 @@ impl From<RefundUpdate> for RefundUpdateInternal {
                 metadata,
                 refund_reason: reason,
                 updated_by,
-                ..Default::default()
+                connector_refund_id: None,
+                refund_status: None,
+                sent_to_gateway: None,
+                refund_error_message: None,
+                refund_arn: None,
+                refund_error_code: None,
+                modified_at: common_utils::date_time::now(),
             },
             RefundUpdate::StatusUpdate {
                 connector_refund_id,
@@ -194,7 +244,12 @@ impl From<RefundUpdate> for RefundUpdateInternal {
                 sent_to_gateway: Some(sent_to_gateway),
                 refund_status: Some(refund_status),
                 updated_by,
-                ..Default::default()
+                refund_error_message: None,
+                refund_arn: None,
+                metadata: None,
+                refund_reason: None,
+                refund_error_code: None,
+                modified_at: common_utils::date_time::now(),
             },
             RefundUpdate::ErrorUpdate {
                 refund_status,
@@ -208,7 +263,11 @@ impl From<RefundUpdate> for RefundUpdateInternal {
                 refund_error_code,
                 updated_by,
                 connector_refund_id,
-                ..Default::default()
+                sent_to_gateway: None,
+                refund_arn: None,
+                metadata: None,
+                refund_reason: None,
+                modified_at: common_utils::date_time::now(),
             },
             RefundUpdate::ManualUpdate {
                 refund_status,
@@ -220,7 +279,12 @@ impl From<RefundUpdate> for RefundUpdateInternal {
                 refund_error_message,
                 refund_error_code,
                 updated_by,
-                ..Default::default()
+                connector_refund_id: None,
+                sent_to_gateway: None,
+                refund_arn: None,
+                metadata: None,
+                refund_reason: None,
+                modified_at: common_utils::date_time::now(),
             },
         }
     }
@@ -238,6 +302,7 @@ impl RefundUpdate {
             refund_reason,
             refund_error_code,
             updated_by,
+            modified_at: _,
         } = self.into();
         Refund {
             connector_refund_id: connector_refund_id.or(source.connector_refund_id),
@@ -249,6 +314,7 @@ impl RefundUpdate {
             metadata: metadata.or(source.metadata),
             refund_reason: refund_reason.or(source.refund_reason),
             updated_by,
+            modified_at: common_utils::date_time::now(),
             ..source
         }
     }
diff --git a/crates/diesel_models/src/reverse_lookup.rs b/crates/diesel_models/src/reverse_lookup.rs
index a9463d27b63..87fca344078 100644
--- a/crates/diesel_models/src/reverse_lookup.rs
+++ b/crates/diesel_models/src/reverse_lookup.rs
@@ -1,4 +1,4 @@
-use diesel::{Identifiable, Insertable, Queryable};
+use diesel::{Identifiable, Insertable, Queryable, Selectable};
 
 use crate::schema::reverse_lookup;
 
@@ -6,10 +6,17 @@ use crate::schema::reverse_lookup;
 /// This reverse lookup table basically looks up id's and get result_id that you want. This is
 /// useful for KV where you can't lookup without key
 #[derive(
-    Clone, Debug, serde::Serialize, serde::Deserialize, Identifiable, Queryable, Eq, PartialEq,
+    Clone,
+    Debug,
+    serde::Serialize,
+    serde::Deserialize,
+    Identifiable,
+    Queryable,
+    Selectable,
+    Eq,
+    PartialEq,
 )]
-#[diesel(table_name = reverse_lookup)]
-#[diesel(primary_key(lookup_id))]
+#[diesel(table_name = reverse_lookup, primary_key(lookup_id), check_for_backend(diesel::pg::Pg))]
 pub struct ReverseLookup {
     /// Primary key. The key id.
     pub lookup_id: String,
diff --git a/crates/diesel_models/src/role.rs b/crates/diesel_models/src/role.rs
index 075d0602554..b5b80628039 100644
--- a/crates/diesel_models/src/role.rs
+++ b/crates/diesel_models/src/role.rs
@@ -1,10 +1,10 @@
-use diesel::{AsChangeset, Identifiable, Insertable, Queryable};
+use diesel::{AsChangeset, Identifiable, Insertable, Queryable, Selectable};
 use time::PrimitiveDateTime;
 
 use crate::{enums, schema::roles};
 
-#[derive(Clone, Debug, Identifiable, Queryable)]
-#[diesel(table_name = roles)]
+#[derive(Clone, Debug, Identifiable, Queryable, Selectable)]
+#[diesel(table_name = roles, check_for_backend(diesel::pg::Pg))]
 pub struct Role {
     pub id: i32,
     pub role_name: String,
diff --git a/crates/diesel_models/src/routing_algorithm.rs b/crates/diesel_models/src/routing_algorithm.rs
index 11e80f29daf..4634dd1af49 100644
--- a/crates/diesel_models/src/routing_algorithm.rs
+++ b/crates/diesel_models/src/routing_algorithm.rs
@@ -1,10 +1,10 @@
-use diesel::{Identifiable, Insertable, Queryable};
+use diesel::{Identifiable, Insertable, Queryable, Selectable};
 use serde::{Deserialize, Serialize};
 
 use crate::{enums, schema::routing_algorithm};
 
-#[derive(Clone, Debug, Identifiable, Insertable, Queryable, Serialize, Deserialize)]
-#[diesel(table_name = routing_algorithm, primary_key(algorithm_id))]
+#[derive(Clone, Debug, Identifiable, Insertable, Queryable, Selectable, Serialize, Deserialize)]
+#[diesel(table_name = routing_algorithm, primary_key(algorithm_id), check_for_backend(diesel::pg::Pg))]
 pub struct RoutingAlgorithm {
     pub algorithm_id: String,
     pub profile_id: String,
diff --git a/crates/diesel_models/src/user.rs b/crates/diesel_models/src/user.rs
index b1bbb66256c..56c6f00f2b0 100644
--- a/crates/diesel_models/src/user.rs
+++ b/crates/diesel_models/src/user.rs
@@ -1,5 +1,5 @@
 use common_utils::pii;
-use diesel::{AsChangeset, Identifiable, Insertable, Queryable};
+use diesel::{AsChangeset, Identifiable, Insertable, Queryable, Selectable};
 use masking::Secret;
 use time::PrimitiveDateTime;
 
@@ -10,8 +10,8 @@ use crate::{
 pub mod dashboard_metadata;
 
 pub mod sample_data;
-#[derive(Clone, Debug, Identifiable, Queryable)]
-#[diesel(table_name = users)]
+#[derive(Clone, Debug, Identifiable, Queryable, Selectable)]
+#[diesel(table_name = users, check_for_backend(diesel::pg::Pg))]
 pub struct User {
     pub id: i32,
     pub user_id: String,
diff --git a/crates/diesel_models/src/user/dashboard_metadata.rs b/crates/diesel_models/src/user/dashboard_metadata.rs
index 48028ba6b5f..a01f88fcb12 100644
--- a/crates/diesel_models/src/user/dashboard_metadata.rs
+++ b/crates/diesel_models/src/user/dashboard_metadata.rs
@@ -1,10 +1,10 @@
-use diesel::{query_builder::AsChangeset, Identifiable, Insertable, Queryable};
+use diesel::{query_builder::AsChangeset, Identifiable, Insertable, Queryable, Selectable};
 use time::PrimitiveDateTime;
 
 use crate::{enums, schema::dashboard_metadata};
 
-#[derive(Clone, Debug, Identifiable, Queryable)]
-#[diesel(table_name = dashboard_metadata)]
+#[derive(Clone, Debug, Identifiable, Queryable, Selectable)]
+#[diesel(table_name = dashboard_metadata, check_for_backend(diesel::pg::Pg))]
 pub struct DashboardMetadata {
     pub id: i32,
     pub user_id: Option<String>,
diff --git a/crates/diesel_models/src/user/sample_data.rs b/crates/diesel_models/src/user/sample_data.rs
index 1d9cd87ad4e..7a0f00acf83 100644
--- a/crates/diesel_models/src/user/sample_data.rs
+++ b/crates/diesel_models/src/user/sample_data.rs
@@ -12,7 +12,7 @@ use crate::{
 };
 
 #[derive(
-    Clone, Debug, Default, diesel::Insertable, router_derive::DebugAsDisplay, Serialize, Deserialize,
+    Clone, Debug, diesel::Insertable, router_derive::DebugAsDisplay, Serialize, Deserialize,
 )]
 #[diesel(table_name = payment_attempt)]
 pub struct PaymentAttemptBatchNew {
@@ -35,10 +35,10 @@ pub struct PaymentAttemptBatchNew {
     pub capture_on: Option<PrimitiveDateTime>,
     pub confirm: bool,
     pub authentication_type: Option<AuthenticationType>,
-    #[serde(default, with = "common_utils::custom_serde::iso8601::option")]
-    pub created_at: Option<PrimitiveDateTime>,
-    #[serde(default, with = "common_utils::custom_serde::iso8601::option")]
-    pub modified_at: Option<PrimitiveDateTime>,
+    #[serde(with = "common_utils::custom_serde::iso8601")]
+    pub created_at: PrimitiveDateTime,
+    #[serde(with = "common_utils::custom_serde::iso8601")]
+    pub modified_at: PrimitiveDateTime,
     #[serde(default, with = "common_utils::custom_serde::iso8601::option")]
     pub last_synced: Option<PrimitiveDateTime>,
     pub cancellation_reason: Option<String>,
diff --git a/crates/diesel_models/src/user_authentication_method.rs b/crates/diesel_models/src/user_authentication_method.rs
index 2b4ed23c1d8..18a65b9f104 100644
--- a/crates/diesel_models/src/user_authentication_method.rs
+++ b/crates/diesel_models/src/user_authentication_method.rs
@@ -1,10 +1,10 @@
-use diesel::{AsChangeset, Identifiable, Insertable, Queryable};
+use diesel::{AsChangeset, Identifiable, Insertable, Queryable, Selectable};
 use time::PrimitiveDateTime;
 
 use crate::{encryption::Encryption, enums, schema::user_authentication_methods};
 
-#[derive(Clone, Debug, Identifiable, Queryable)]
-#[diesel(table_name = user_authentication_methods)]
+#[derive(Clone, Debug, Identifiable, Queryable, Selectable)]
+#[diesel(table_name = user_authentication_methods, check_for_backend(diesel::pg::Pg))]
 pub struct UserAuthenticationMethod {
     pub id: String,
     pub auth_id: String,
diff --git a/crates/diesel_models/src/user_key_store.rs b/crates/diesel_models/src/user_key_store.rs
index a35b4d9d169..1b19ef31a49 100644
--- a/crates/diesel_models/src/user_key_store.rs
+++ b/crates/diesel_models/src/user_key_store.rs
@@ -1,11 +1,12 @@
-use diesel::{Identifiable, Insertable, Queryable};
+use diesel::{Identifiable, Insertable, Queryable, Selectable};
 use time::PrimitiveDateTime;
 
 use crate::{encryption::Encryption, schema::user_key_store};
 
-#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Identifiable, Queryable)]
-#[diesel(table_name = user_key_store)]
-#[diesel(primary_key(user_id))]
+#[derive(
+    Clone, Debug, serde::Serialize, serde::Deserialize, Identifiable, Queryable, Selectable,
+)]
+#[diesel(table_name = user_key_store, primary_key(user_id), check_for_backend(diesel::pg::Pg))]
 pub struct UserKeyStore {
     pub user_id: String,
     pub key: Encryption,
diff --git a/crates/diesel_models/src/user_role.rs b/crates/diesel_models/src/user_role.rs
index 3c32092fa91..ea8b626358e 100644
--- a/crates/diesel_models/src/user_role.rs
+++ b/crates/diesel_models/src/user_role.rs
@@ -1,10 +1,10 @@
-use diesel::{AsChangeset, Identifiable, Insertable, Queryable};
+use diesel::{AsChangeset, Identifiable, Insertable, Queryable, Selectable};
 use time::PrimitiveDateTime;
 
 use crate::{enums, schema::user_roles};
 
-#[derive(Clone, Debug, Identifiable, Queryable)]
-#[diesel(table_name = user_roles)]
+#[derive(Clone, Debug, Identifiable, Queryable, Selectable)]
+#[diesel(table_name = user_roles, check_for_backend(diesel::pg::Pg))]
 pub struct UserRole {
     pub id: i32,
     pub user_id: String,
diff --git a/crates/hyperswitch_domain_models/src/payments/payment_attempt.rs b/crates/hyperswitch_domain_models/src/payments/payment_attempt.rs
index e7ccd6f33a6..fb8ce2d6966 100644
--- a/crates/hyperswitch_domain_models/src/payments/payment_attempt.rs
+++ b/crates/hyperswitch_domain_models/src/payments/payment_attempt.rs
@@ -632,8 +632,8 @@ impl behaviour::Conversion for PaymentIntent {
             billing_address_id: self.billing_address_id,
             statement_descriptor_name: self.statement_descriptor_name,
             statement_descriptor_suffix: self.statement_descriptor_suffix,
-            created_at: Some(self.created_at),
-            modified_at: Some(self.modified_at),
+            created_at: self.created_at,
+            modified_at: self.modified_at,
             last_synced: self.last_synced,
             setup_future_usage: self.setup_future_usage,
             off_session: self.off_session,
diff --git a/crates/hyperswitch_domain_models/src/payments/payment_intent.rs b/crates/hyperswitch_domain_models/src/payments/payment_intent.rs
index dc801e37546..6eb35616729 100644
--- a/crates/hyperswitch_domain_models/src/payments/payment_intent.rs
+++ b/crates/hyperswitch_domain_models/src/payments/payment_intent.rs
@@ -630,7 +630,7 @@ impl From<PaymentIntentUpdate> for DieselPaymentIntentUpdate {
 
 impl From<PaymentIntentUpdateInternal> for diesel_models::PaymentIntentUpdateInternal {
     fn from(value: PaymentIntentUpdateInternal) -> Self {
-        let modified_at = Some(common_utils::date_time::now());
+        let modified_at = common_utils::date_time::now();
 
         let PaymentIntentUpdateInternal {
             amount,
diff --git a/crates/router/src/core/refunds.rs b/crates/router/src/core/refunds.rs
index cf45f077295..5b74eefb9a4 100644
--- a/crates/router/src/core/refunds.rs
+++ b/crates/router/src/core/refunds.rs
@@ -804,8 +804,8 @@ pub async fn validate_and_create_refund(
         .set_total_amount(payment_attempt.amount)
         .set_refund_amount(refund_amount)
         .set_currency(currency)
-        .set_created_at(Some(common_utils::date_time::now()))
-        .set_modified_at(Some(common_utils::date_time::now()))
+        .set_created_at(common_utils::date_time::now())
+        .set_modified_at(common_utils::date_time::now())
         .set_refund_status(enums::RefundStatus::Pending)
         .set_metadata(req.metadata)
         .set_description(req.reason.clone())
@@ -1030,7 +1030,7 @@ impl ForeignFrom<storage::Refund> for api::RefundResponse {
             error_message: refund.refund_error_message,
             error_code: refund.refund_error_code,
             created_at: Some(refund.created_at),
-            updated_at: Some(refund.updated_at),
+            updated_at: Some(refund.modified_at),
             connector: refund.connector,
             merchant_connector_id: refund.merchant_connector_id,
             charges: refund.charges,
diff --git a/crates/router/src/db/refund.rs b/crates/router/src/db/refund.rs
index c5edd863caf..a36af014710 100644
--- a/crates/router/src/db/refund.rs
+++ b/crates/router/src/db/refund.rs
@@ -273,7 +273,7 @@ mod storage {
 
 #[cfg(feature = "kv_store")]
 mod storage {
-    use common_utils::{date_time, ext_traits::Encode, fallback_reverse_lookup_not_found};
+    use common_utils::{ext_traits::Encode, fallback_reverse_lookup_not_found};
     use error_stack::{report, ResultExt};
     use redis_interface::HsetnxReply;
     use router_env::{instrument, tracing};
@@ -389,8 +389,8 @@ mod storage {
                         refund_error_code: None,
                         metadata: new.metadata.clone(),
                         refund_arn: new.refund_arn.clone(),
-                        created_at: new.created_at.unwrap_or_else(date_time::now),
-                        updated_at: new.created_at.unwrap_or_else(date_time::now),
+                        created_at: new.created_at,
+                        modified_at: new.created_at,
                         description: new.description.clone(),
                         refund_reason: new.refund_reason.clone(),
                         profile_id: new.profile_id.clone(),
@@ -844,8 +844,8 @@ impl RefundInterface for MockDb {
             refund_error_code: None,
             metadata: new.metadata,
             refund_arn: new.refund_arn.clone(),
-            created_at: new.created_at.unwrap_or(current_time),
-            updated_at: current_time,
+            created_at: new.created_at,
+            modified_at: current_time,
             description: new.description,
             refund_reason: new.refund_reason.clone(),
             profile_id: new.profile_id,
diff --git a/crates/router/src/services/kafka/refund.rs b/crates/router/src/services/kafka/refund.rs
index d5ef71bf651..14b317b52ea 100644
--- a/crates/router/src/services/kafka/refund.rs
+++ b/crates/router/src/services/kafka/refund.rs
@@ -50,7 +50,7 @@ impl<'a> KafkaRefund<'a> {
             refund_error_message: refund.refund_error_message.as_ref(),
             refund_arn: refund.refund_arn.as_ref(),
             created_at: refund.created_at.assume_utc(),
-            modified_at: refund.updated_at.assume_utc(),
+            modified_at: refund.modified_at.assume_utc(),
             description: refund.description.as_ref(),
             attempt_id: &refund.attempt_id,
             refund_reason: refund.refund_reason.as_ref(),
diff --git a/crates/router/src/services/kafka/refund_event.rs b/crates/router/src/services/kafka/refund_event.rs
index 6aa80b243c1..fea0b8c45e7 100644
--- a/crates/router/src/services/kafka/refund_event.rs
+++ b/crates/router/src/services/kafka/refund_event.rs
@@ -51,7 +51,7 @@ impl<'a> KafkaRefundEvent<'a> {
             refund_error_message: refund.refund_error_message.as_ref(),
             refund_arn: refund.refund_arn.as_ref(),
             created_at: refund.created_at.assume_utc(),
-            modified_at: refund.updated_at.assume_utc(),
+            modified_at: refund.modified_at.assume_utc(),
             description: refund.description.as_ref(),
             attempt_id: &refund.attempt_id,
             refund_reason: refund.refund_reason.as_ref(),
diff --git a/crates/router/src/utils/user/sample_data.rs b/crates/router/src/utils/user/sample_data.rs
index 4a6c76aab74..b817d3e1cd7 100644
--- a/crates/router/src/utils/user/sample_data.rs
+++ b/crates/router/src/utils/user/sample_data.rs
@@ -263,14 +263,49 @@ pub async fn generate_sample_data(
                 _ => None,
             },
             confirm: true,
-            created_at: Some(created_at),
-            modified_at: Some(modified_at),
+            created_at,
+            modified_at,
             last_synced: Some(last_synced),
             amount_to_capture: Some(amount * 100),
             connector_response_reference_id: Some(attempt_id.clone()),
             updated_by: merchant_from_db.storage_scheme.to_string(),
-
-            ..Default::default()
+            save_to_locker: None,
+            offer_amount: None,
+            surcharge_amount: None,
+            tax_amount: None,
+            payment_method_id: None,
+            capture_method: None,
+            capture_on: None,
+            cancellation_reason: None,
+            mandate_id: None,
+            browser_info: None,
+            payment_token: None,
+            connector_metadata: None,
+            payment_experience: None,
+            payment_method_data: None,
+            business_sub_label: None,
+            straight_through_algorithm: None,
+            preprocessing_step_id: None,
+            mandate_details: None,
+            error_reason: None,
+            multiple_capture_count: None,
+            amount_capturable: i64::default(),
+            merchant_connector_id: None,
+            authentication_data: None,
+            encoded_data: None,
+            unified_code: None,
+            unified_message: None,
+            net_amount: None,
+            external_three_ds_authentication_attempted: None,
+            authentication_connector: None,
+            authentication_id: None,
+            mandate_data: None,
+            payment_method_billing_address_id: None,
+            fingerprint_id: None,
+            charge_id: None,
+            client_source: None,
+            client_version: None,
+            customer_acceptance: None,
         };
 
         let refund = if refunds_count < number_of_refunds && !is_failed_payment {
@@ -285,8 +320,8 @@ pub async fn generate_sample_data(
                 connector_transaction_id: attempt_id.clone(),
                 connector_refund_id: None,
                 description: Some("This is a sample refund".to_string()),
-                created_at: Some(created_at),
-                modified_at: Some(modified_at),
+                created_at,
+                modified_at,
                 refund_reason: Some("Sample Refund".to_string()),
                 connector: payment_attempt
                     .connector
diff --git a/crates/storage_impl/src/payments/payment_attempt.rs b/crates/storage_impl/src/payments/payment_attempt.rs
index 7a56cae1741..a5b1e902593 100644
--- a/crates/storage_impl/src/payments/payment_attempt.rs
+++ b/crates/storage_impl/src/payments/payment_attempt.rs
@@ -1303,8 +1303,10 @@ impl DataModelExt for PaymentAttemptNew {
             capture_on: self.capture_on,
             confirm: self.confirm,
             authentication_type: self.authentication_type,
-            created_at: self.created_at,
-            modified_at: self.modified_at,
+            created_at: self.created_at.unwrap_or_else(common_utils::date_time::now),
+            modified_at: self
+                .modified_at
+                .unwrap_or_else(common_utils::date_time::now),
             last_synced: self.last_synced,
             cancellation_reason: self.cancellation_reason,
             amount_to_capture: self
@@ -1367,8 +1369,8 @@ impl DataModelExt for PaymentAttemptNew {
             capture_on: storage_model.capture_on,
             confirm: storage_model.confirm,
             authentication_type: storage_model.authentication_type,
-            created_at: storage_model.created_at,
-            modified_at: storage_model.modified_at,
+            created_at: Some(storage_model.created_at),
+            modified_at: Some(storage_model.modified_at),
             last_synced: storage_model.last_synced,
             cancellation_reason: storage_model.cancellation_reason,
             amount_to_capture: storage_model.amount_to_capture.map(MinorUnit::new),
diff --git a/crates/storage_impl/src/payouts/payouts.rs b/crates/storage_impl/src/payouts/payouts.rs
index 69005a27a8b..7a9dba0f20b 100644
--- a/crates/storage_impl/src/payouts/payouts.rs
+++ b/crates/storage_impl/src/payouts/payouts.rs
@@ -746,8 +746,10 @@ impl DataModelExt for PayoutsNew {
             return_url: self.return_url,
             entity_type: self.entity_type,
             metadata: self.metadata,
-            created_at: self.created_at,
-            last_modified_at: self.last_modified_at,
+            created_at: self.created_at.unwrap_or_else(common_utils::date_time::now),
+            last_modified_at: self
+                .last_modified_at
+                .unwrap_or_else(common_utils::date_time::now),
             profile_id: self.profile_id,
             status: self.status,
             attempt_count: self.attempt_count,
@@ -775,8 +777,8 @@ impl DataModelExt for PayoutsNew {
             return_url: storage_model.return_url,
             entity_type: storage_model.entity_type,
             metadata: storage_model.metadata,
-            created_at: storage_model.created_at,
-            last_modified_at: storage_model.last_modified_at,
+            created_at: Some(storage_model.created_at),
+            last_modified_at: Some(storage_model.last_modified_at),
             profile_id: storage_model.profile_id,
             status: storage_model.status,
             attempt_count: storage_model.attempt_count,