mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-28 04:04:55 +08:00
feat(payment_methods): added kv support for payment_methods table (#4311)
Co-authored-by: Akshay S <akshay.s@Akshay-Subramanian-D66TQ6D97K.local> Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
@ -13,6 +13,7 @@ pub mod errors;
|
||||
mod lookup;
|
||||
pub mod metrics;
|
||||
pub mod mock_db;
|
||||
pub mod payment_method;
|
||||
pub mod payments;
|
||||
#[cfg(feature = "payouts")]
|
||||
pub mod payouts;
|
||||
@ -361,6 +362,15 @@ impl UniqueConstraints for diesel_models::PayoutAttempt {
|
||||
}
|
||||
}
|
||||
|
||||
impl UniqueConstraints for diesel_models::PaymentMethod {
|
||||
fn unique_constraints(&self) -> Vec<String> {
|
||||
vec![format!("paymentmethod_{}", self.payment_method_id)]
|
||||
}
|
||||
fn table_name(&self) -> &str {
|
||||
"PaymentMethod"
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(not(feature = "payouts"))]
|
||||
impl<T: DatabaseStore> PayoutAttemptInterface for KVRouterStore<T> {}
|
||||
#[cfg(not(feature = "payouts"))]
|
||||
|
||||
Reference in New Issue
Block a user