build(deps): bump diesel from 2.0.3 to 2.1.0 (#1287)

This commit is contained in:
Sanchith Hegde
2023-05-29 13:57:27 +05:30
committed by GitHub
parent 597ec16907
commit b9ec38a1b5
14 changed files with 478 additions and 264 deletions

563
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -6,10 +6,10 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies] [dependencies]
diesel = { version = "2.1.0", features = ["postgres"] }
serde = { version = "1.0.160", features = [ "derive" ] } serde = { version = "1.0.160", features = [ "derive" ] }
strum = { version = "0.24.1", features = [ "derive" ] } strum = { version = "0.24.1", features = [ "derive" ] }
utoipa = { version = "3.3.0", features = ["preserve_order"] } utoipa = { version = "3.3.0", features = ["preserve_order"] }
diesel = { version = "2.0.3", features = ["postgres"] }
# First party crates # First party crates
router_derive = { version = "0.1.0", path = "../router_derive" } router_derive = { version = "0.1.0", path = "../router_derive" }

View File

@ -15,6 +15,7 @@ logs = ["dep:router_env"]
[dependencies] [dependencies]
async-trait = { version = "0.1.68", optional = true } async-trait = { version = "0.1.68", optional = true }
bytes = "1.4.0" bytes = "1.4.0"
diesel = "2.1.0"
error-stack = "0.3.1" error-stack = "0.3.1"
futures = { version = "0.3.28", optional = true } futures = { version = "0.3.28", optional = true }
hex = "0.4.3" hex = "0.4.3"
@ -36,7 +37,6 @@ md5 = "0.7.0"
# First party crates # First party crates
masking = { version = "0.1.0", path = "../masking" } masking = { version = "0.1.0", path = "../masking" }
router_env = { version = "0.1.0", path = "../router_env", features = ["log_extra_implicit_fields", "log_custom_entries_to_extra"], optional = true } router_env = { version = "0.1.0", path = "../router_env", features = ["log_extra_implicit_fields", "log_custom_entries_to_extra"], optional = true }
diesel = "2.0.3"
[target.'cfg(not(target_os = "windows"))'.dependencies] [target.'cfg(not(target_os = "windows"))'.dependencies]
signal-hook-tokio = { version = "0.3.1", features = ["futures-v0_3"], optional = true } signal-hook-tokio = { version = "0.3.1", features = ["futures-v0_3"], optional = true }

View File

@ -3,7 +3,6 @@
use std::{convert::AsRef, fmt, ops, str::FromStr}; use std::{convert::AsRef, fmt, ops, str::FromStr};
use diesel::{ use diesel::{
backend,
backend::Backend, backend::Backend,
deserialize, deserialize,
deserialize::FromSql, deserialize::FromSql,
@ -153,7 +152,7 @@ where
DB: Backend, DB: Backend,
String: FromSql<sql_types::Text, DB>, String: FromSql<sql_types::Text, DB>,
{ {
fn from_sql(bytes: backend::RawValue<'_, DB>) -> deserialize::Result<Self> { fn from_sql(bytes: DB::RawValue<'_>) -> deserialize::Result<Self> {
let val = String::from_sql(bytes)?; let val = String::from_sql(bytes)?;
Ok(Self::from_str(val.as_str())?) Ok(Self::from_str(val.as_str())?)
} }

View File

@ -16,7 +16,7 @@ async-bb8-diesel = { git = "https://github.com/juspay/async-bb8-diesel", rev = "
bb8 = "0.8" bb8 = "0.8"
clap = { version = "4.2.2", default-features = false, features = ["std", "derive", "help", "usage"] } clap = { version = "4.2.2", default-features = false, features = ["std", "derive", "help", "usage"] }
config = { version = "0.13.3", features = ["toml"] } config = { version = "0.13.3", features = ["toml"] }
diesel = { version = "2.0.3", features = ["postgres"] } diesel = { version = "2.1.0", features = ["postgres"] }
error-stack = "0.3.1" error-stack = "0.3.1"
once_cell = "1.17.1" once_cell = "1.17.1"
serde = "1.0.160" serde = "1.0.160"

View File

@ -17,7 +17,7 @@ rustdoc-args = ["--cfg", "docsrs"]
[dependencies] [dependencies]
bytes = { version = "1", optional = true } bytes = { version = "1", optional = true }
diesel = { version = "2.0.3", features = ["postgres", "serde_json", "time"], optional = true } diesel = { version = "2.1.0", features = ["postgres", "serde_json", "time"], optional = true }
serde = { version = "1", features = ["derive"], optional = true } serde = { version = "1", features = ["derive"], optional = true }
serde_json = "1.0.96" serde_json = "1.0.96"
subtle = "=2.4.1" subtle = "=2.4.1"

View File

@ -4,7 +4,7 @@
pub use diesel::Expression; pub use diesel::Expression;
use diesel::{ use diesel::{
backend::{Backend, RawValue}, backend::Backend,
deserialize::{self, FromSql, Queryable}, deserialize::{self, FromSql, Queryable},
expression::AsExpression, expression::AsExpression,
internal::derives::as_expression::Bound, internal::derives::as_expression::Bound,
@ -53,7 +53,7 @@ where
S: FromSql<T, DB>, S: FromSql<T, DB>,
I: Strategy<S>, I: Strategy<S>,
{ {
fn from_sql(bytes: RawValue<'_, DB>) -> diesel::deserialize::Result<Self> { fn from_sql(bytes: DB::RawValue<'_>) -> diesel::deserialize::Result<Self> {
S::from_sql(bytes).map(|raw| raw.into()) S::from_sql(bytes).map(|raw| raw.into())
} }
} }
@ -123,7 +123,7 @@ where
S: FromSql<T, DB> + ZeroizableSecret, S: FromSql<T, DB> + ZeroizableSecret,
I: Strategy<S>, I: Strategy<S>,
{ {
fn from_sql(bytes: RawValue<'_, DB>) -> diesel::deserialize::Result<Self> { fn from_sql(bytes: DB::RawValue<'_>) -> diesel::deserialize::Result<Self> {
S::from_sql(bytes).map(|raw| raw.into()) S::from_sql(bytes).map(|raw| raw.into())
} }
} }

View File

@ -44,7 +44,7 @@ bytes = "1.4.0"
clap = { version = "4.2.2", default-features = false, features = ["std", "derive", "help", "usage"] } clap = { version = "4.2.2", default-features = false, features = ["std", "derive", "help", "usage"] }
config = { version = "0.13.3", features = ["toml"] } config = { version = "0.13.3", features = ["toml"] }
crc32fast = "1.3.2" crc32fast = "1.3.2"
diesel = { version = "2.0.3", features = ["postgres"] } diesel = { version = "2.1.0", features = ["postgres"] }
dyn-clone = "1.0.11" dyn-clone = "1.0.11"
encoding_rs = "0.8.32" encoding_rs = "0.8.32"
error-stack = "0.3.1" error-stack = "0.3.1"

View File

@ -18,7 +18,7 @@ quote = "1.0.26"
syn = { version = "1.0.109", features = ["full", "extra-traits"] } # the full feature does not seem to encompass all the features syn = { version = "1.0.109", features = ["full", "extra-traits"] } # the full feature does not seem to encompass all the features
[dev-dependencies] [dev-dependencies]
diesel = { version = "2.0.3", features = ["postgres"] } diesel = { version = "2.1.0", features = ["postgres"] }
serde = { version = "1.0.160", features = ["derive"] } serde = { version = "1.0.160", features = ["derive"] }
serde_json = "1.0.96" serde_json = "1.0.96"
strum = { version = "0.24.1", features = ["derive"] } strum = { version = "0.24.1", features = ["derive"] }

View File

@ -12,7 +12,7 @@ kv_store = []
[dependencies] [dependencies]
async-bb8-diesel = { git = "https://github.com/juspay/async-bb8-diesel", rev = "9a71d142726dbc33f41c1fd935ddaa79841c7be5" } async-bb8-diesel = { git = "https://github.com/juspay/async-bb8-diesel", rev = "9a71d142726dbc33f41c1fd935ddaa79841c7be5" }
async-trait = "0.1.68" async-trait = "0.1.68"
diesel = { version = "2.0.3", features = ["postgres", "serde_json", "time", "64-column-tables"] } diesel = { version = "2.1.0", features = ["postgres", "serde_json", "time", "64-column-tables"] }
error-stack = "0.3.1" error-stack = "0.3.1"
frunk = "0.4.1" frunk = "0.4.1"
frunk_core = "0.4.1" frunk_core = "0.4.1"

View File

@ -117,7 +117,7 @@ mod diesel_impl {
DB: Backend, DB: Backend,
String: FromSql<Text, DB>, String: FromSql<Text, DB>,
{ {
fn from_sql(bytes: diesel::backend::RawValue<'_, DB>) -> diesel::deserialize::Result<Self> { fn from_sql(bytes: DB::RawValue<'_>) -> diesel::deserialize::Result<Self> {
Ok(Self(String::from_sql(bytes)?)) Ok(Self(String::from_sql(bytes)?))
} }
} }

View File

@ -598,7 +598,7 @@ impl<DB: Backend> FromSql<Jsonb, DB> for MandateDataType
where where
serde_json::Value: FromSql<Jsonb, DB>, serde_json::Value: FromSql<Jsonb, DB>,
{ {
fn from_sql(bytes: diesel::backend::RawValue<'_, DB>) -> diesel::deserialize::Result<Self> { fn from_sql(bytes: DB::RawValue<'_>) -> diesel::deserialize::Result<Self> {
let value = <serde_json::Value as FromSql<Jsonb, DB>>::from_sql(bytes)?; let value = <serde_json::Value as FromSql<Jsonb, DB>>::from_sql(bytes)?;
Ok(serde_json::from_value(value)?) Ok(serde_json::from_value(value)?)
} }

View File

@ -23,6 +23,7 @@ pub mod process_tracker;
pub mod query; pub mod query;
pub mod refund; pub mod refund;
pub mod reverse_lookup; pub mod reverse_lookup;
#[allow(unused_qualifications)]
pub mod schema; pub mod schema;
use diesel_impl::{DieselArray, OptionalDieselArray}; use diesel_impl::{DieselArray, OptionalDieselArray};

View File

@ -6,21 +6,34 @@ diesel::table! {
address (address_id) { address (address_id) {
id -> Int4, id -> Int4,
#[max_length = 64]
address_id -> Varchar, address_id -> Varchar,
#[max_length = 128]
city -> Nullable<Varchar>, city -> Nullable<Varchar>,
country -> Nullable<CountryAlpha2>, country -> Nullable<CountryAlpha2>,
#[max_length = 255]
line1 -> Nullable<Varchar>, line1 -> Nullable<Varchar>,
#[max_length = 255]
line2 -> Nullable<Varchar>, line2 -> Nullable<Varchar>,
#[max_length = 255]
line3 -> Nullable<Varchar>, line3 -> Nullable<Varchar>,
#[max_length = 128]
state -> Nullable<Varchar>, state -> Nullable<Varchar>,
#[max_length = 16]
zip -> Nullable<Varchar>, zip -> Nullable<Varchar>,
#[max_length = 255]
first_name -> Nullable<Varchar>, first_name -> Nullable<Varchar>,
#[max_length = 255]
last_name -> Nullable<Varchar>, last_name -> Nullable<Varchar>,
#[max_length = 32]
phone_number -> Nullable<Varchar>, phone_number -> Nullable<Varchar>,
#[max_length = 8]
country_code -> Nullable<Varchar>, country_code -> Nullable<Varchar>,
created_at -> Timestamp, created_at -> Timestamp,
modified_at -> Timestamp, modified_at -> Timestamp,
#[max_length = 64]
customer_id -> Varchar, customer_id -> Varchar,
#[max_length = 64]
merchant_id -> Varchar, merchant_id -> Varchar,
} }
} }
@ -30,11 +43,17 @@ diesel::table! {
use crate::enums::diesel_exports::*; use crate::enums::diesel_exports::*;
api_keys (key_id) { api_keys (key_id) {
#[max_length = 64]
key_id -> Varchar, key_id -> Varchar,
#[max_length = 64]
merchant_id -> Varchar, merchant_id -> Varchar,
#[max_length = 64]
name -> Varchar, name -> Varchar,
#[max_length = 256]
description -> Nullable<Varchar>, description -> Nullable<Varchar>,
#[max_length = 128]
hashed_api_key -> Varchar, hashed_api_key -> Varchar,
#[max_length = 16]
prefix -> Varchar, prefix -> Varchar,
created_at -> Timestamp, created_at -> Timestamp,
expires_at -> Nullable<Timestamp>, expires_at -> Nullable<Timestamp>,
@ -47,14 +66,18 @@ diesel::table! {
use crate::enums::diesel_exports::*; use crate::enums::diesel_exports::*;
cards_info (card_iin) { cards_info (card_iin) {
#[max_length = 16]
card_iin -> Varchar, card_iin -> Varchar,
card_issuer -> Nullable<Text>, card_issuer -> Nullable<Text>,
card_network -> Nullable<Text>, card_network -> Nullable<Text>,
card_type -> Nullable<Text>, card_type -> Nullable<Text>,
card_subtype -> Nullable<Text>, card_subtype -> Nullable<Text>,
card_issuing_country -> Nullable<Text>, card_issuing_country -> Nullable<Text>,
#[max_length = 32]
bank_code_id -> Nullable<Varchar>, bank_code_id -> Nullable<Varchar>,
#[max_length = 32]
bank_code -> Nullable<Varchar>, bank_code -> Nullable<Varchar>,
#[max_length = 32]
country_code -> Nullable<Varchar>, country_code -> Nullable<Varchar>,
date_created -> Timestamp, date_created -> Timestamp,
last_updated -> Nullable<Timestamp>, last_updated -> Nullable<Timestamp>,
@ -68,6 +91,7 @@ diesel::table! {
configs (key) { configs (key) {
id -> Int4, id -> Int4,
#[max_length = 255]
key -> Varchar, key -> Varchar,
config -> Text, config -> Text,
} }
@ -79,12 +103,17 @@ diesel::table! {
connector_response (id) { connector_response (id) {
id -> Int4, id -> Int4,
#[max_length = 64]
payment_id -> Varchar, payment_id -> Varchar,
#[max_length = 64]
merchant_id -> Varchar, merchant_id -> Varchar,
#[max_length = 64]
attempt_id -> Varchar, attempt_id -> Varchar,
created_at -> Timestamp, created_at -> Timestamp,
modified_at -> Timestamp, modified_at -> Timestamp,
#[max_length = 64]
connector_name -> Nullable<Varchar>, connector_name -> Nullable<Varchar>,
#[max_length = 128]
connector_transaction_id -> Nullable<Varchar>, connector_transaction_id -> Nullable<Varchar>,
authentication_data -> Nullable<Json>, authentication_data -> Nullable<Json>,
encoded_data -> Nullable<Text>, encoded_data -> Nullable<Text>,
@ -97,12 +126,19 @@ diesel::table! {
customers (customer_id, merchant_id) { customers (customer_id, merchant_id) {
id -> Int4, id -> Int4,
#[max_length = 64]
customer_id -> Varchar, customer_id -> Varchar,
#[max_length = 64]
merchant_id -> Varchar, merchant_id -> Varchar,
#[max_length = 255]
name -> Nullable<Varchar>, name -> Nullable<Varchar>,
#[max_length = 255]
email -> Nullable<Varchar>, email -> Nullable<Varchar>,
#[max_length = 32]
phone -> Nullable<Varchar>, phone -> Nullable<Varchar>,
#[max_length = 8]
phone_country_code -> Nullable<Varchar>, phone_country_code -> Nullable<Varchar>,
#[max_length = 255]
description -> Nullable<Varchar>, description -> Nullable<Varchar>,
created_at -> Timestamp, created_at -> Timestamp,
metadata -> Nullable<Json>, metadata -> Nullable<Json>,
@ -117,23 +153,34 @@ diesel::table! {
dispute (id) { dispute (id) {
id -> Int4, id -> Int4,
#[max_length = 64]
dispute_id -> Varchar, dispute_id -> Varchar,
#[max_length = 255]
amount -> Varchar, amount -> Varchar,
#[max_length = 255]
currency -> Varchar, currency -> Varchar,
dispute_stage -> DisputeStage, dispute_stage -> DisputeStage,
dispute_status -> DisputeStatus, dispute_status -> DisputeStatus,
#[max_length = 255]
payment_id -> Varchar, payment_id -> Varchar,
#[max_length = 64]
attempt_id -> Varchar, attempt_id -> Varchar,
#[max_length = 255]
merchant_id -> Varchar, merchant_id -> Varchar,
#[max_length = 255]
connector_status -> Varchar, connector_status -> Varchar,
#[max_length = 255]
connector_dispute_id -> Varchar, connector_dispute_id -> Varchar,
#[max_length = 255]
connector_reason -> Nullable<Varchar>, connector_reason -> Nullable<Varchar>,
#[max_length = 255]
connector_reason_code -> Nullable<Varchar>, connector_reason_code -> Nullable<Varchar>,
challenge_required_by -> Nullable<Timestamp>, challenge_required_by -> Nullable<Timestamp>,
connector_created_at -> Nullable<Timestamp>, connector_created_at -> Nullable<Timestamp>,
connector_updated_at -> Nullable<Timestamp>, connector_updated_at -> Nullable<Timestamp>,
created_at -> Timestamp, created_at -> Timestamp,
modified_at -> Timestamp, modified_at -> Timestamp,
#[max_length = 255]
connector -> Varchar, connector -> Varchar,
evidence -> Jsonb, evidence -> Jsonb,
} }
@ -145,11 +192,14 @@ diesel::table! {
events (id) { events (id) {
id -> Int4, id -> Int4,
#[max_length = 64]
event_id -> Varchar, event_id -> Varchar,
event_type -> EventType, event_type -> EventType,
event_class -> EventClass, event_class -> EventClass,
is_webhook_notified -> Bool, is_webhook_notified -> Bool,
#[max_length = 64]
intent_reference_id -> Nullable<Varchar>, intent_reference_id -> Nullable<Varchar>,
#[max_length = 64]
primary_object_id -> Varchar, primary_object_id -> Varchar,
primary_object_type -> EventObjectType, primary_object_type -> EventObjectType,
created_at -> Timestamp, created_at -> Timestamp,
@ -161,15 +211,22 @@ diesel::table! {
use crate::enums::diesel_exports::*; use crate::enums::diesel_exports::*;
file_metadata (file_id, merchant_id) { file_metadata (file_id, merchant_id) {
#[max_length = 64]
file_id -> Varchar, file_id -> Varchar,
#[max_length = 255]
merchant_id -> Varchar, merchant_id -> Varchar,
#[max_length = 255]
file_name -> Nullable<Varchar>, file_name -> Nullable<Varchar>,
file_size -> Int4, file_size -> Int4,
#[max_length = 255]
file_type -> Varchar, file_type -> Varchar,
#[max_length = 255]
provider_file_id -> Nullable<Varchar>, provider_file_id -> Nullable<Varchar>,
#[max_length = 255]
file_upload_provider -> Nullable<Varchar>, file_upload_provider -> Nullable<Varchar>,
available -> Bool, available -> Bool,
created_at -> Timestamp, created_at -> Timestamp,
#[max_length = 255]
connector_label -> Nullable<Varchar>, connector_label -> Nullable<Varchar>,
} }
} }
@ -180,19 +237,32 @@ diesel::table! {
locker_mock_up (id) { locker_mock_up (id) {
id -> Int4, id -> Int4,
#[max_length = 255]
card_id -> Varchar, card_id -> Varchar,
#[max_length = 255]
external_id -> Varchar, external_id -> Varchar,
#[max_length = 255]
card_fingerprint -> Varchar, card_fingerprint -> Varchar,
#[max_length = 255]
card_global_fingerprint -> Varchar, card_global_fingerprint -> Varchar,
#[max_length = 255]
merchant_id -> Varchar, merchant_id -> Varchar,
#[max_length = 255]
card_number -> Varchar, card_number -> Varchar,
#[max_length = 255]
card_exp_year -> Varchar, card_exp_year -> Varchar,
#[max_length = 255]
card_exp_month -> Varchar, card_exp_month -> Varchar,
#[max_length = 255]
name_on_card -> Nullable<Varchar>, name_on_card -> Nullable<Varchar>,
#[max_length = 255]
nickname -> Nullable<Varchar>, nickname -> Nullable<Varchar>,
#[max_length = 255]
customer_id -> Nullable<Varchar>, customer_id -> Nullable<Varchar>,
duplicate -> Nullable<Bool>, duplicate -> Nullable<Bool>,
#[max_length = 8]
card_cvc -> Nullable<Varchar>, card_cvc -> Nullable<Varchar>,
#[max_length = 64]
payment_method_id -> Nullable<Varchar>, payment_method_id -> Nullable<Varchar>,
} }
} }
@ -203,22 +273,32 @@ diesel::table! {
mandate (id) { mandate (id) {
id -> Int4, id -> Int4,
#[max_length = 64]
mandate_id -> Varchar, mandate_id -> Varchar,
#[max_length = 64]
customer_id -> Varchar, customer_id -> Varchar,
#[max_length = 64]
merchant_id -> Varchar, merchant_id -> Varchar,
#[max_length = 64]
payment_method_id -> Varchar, payment_method_id -> Varchar,
mandate_status -> MandateStatus, mandate_status -> MandateStatus,
mandate_type -> MandateType, mandate_type -> MandateType,
customer_accepted_at -> Nullable<Timestamp>, customer_accepted_at -> Nullable<Timestamp>,
#[max_length = 64]
customer_ip_address -> Nullable<Varchar>, customer_ip_address -> Nullable<Varchar>,
#[max_length = 255]
customer_user_agent -> Nullable<Varchar>, customer_user_agent -> Nullable<Varchar>,
#[max_length = 128]
network_transaction_id -> Nullable<Varchar>, network_transaction_id -> Nullable<Varchar>,
#[max_length = 64]
previous_attempt_id -> Nullable<Varchar>, previous_attempt_id -> Nullable<Varchar>,
created_at -> Timestamp, created_at -> Timestamp,
mandate_amount -> Nullable<Int8>, mandate_amount -> Nullable<Int8>,
mandate_currency -> Nullable<Currency>, mandate_currency -> Nullable<Currency>,
amount_captured -> Nullable<Int8>, amount_captured -> Nullable<Int8>,
#[max_length = 64]
connector -> Varchar, connector -> Varchar,
#[max_length = 128]
connector_mandate_id -> Nullable<Varchar>, connector_mandate_id -> Nullable<Varchar>,
start_date -> Nullable<Timestamp>, start_date -> Nullable<Timestamp>,
end_date -> Nullable<Timestamp>, end_date -> Nullable<Timestamp>,
@ -233,18 +313,25 @@ diesel::table! {
merchant_account (id) { merchant_account (id) {
id -> Int4, id -> Int4,
#[max_length = 64]
merchant_id -> Varchar, merchant_id -> Varchar,
#[max_length = 255]
return_url -> Nullable<Varchar>, return_url -> Nullable<Varchar>,
enable_payment_response_hash -> Bool, enable_payment_response_hash -> Bool,
#[max_length = 255]
payment_response_hash_key -> Nullable<Varchar>, payment_response_hash_key -> Nullable<Varchar>,
redirect_to_merchant_with_http_post -> Bool, redirect_to_merchant_with_http_post -> Bool,
#[max_length = 128]
merchant_name -> Nullable<Varchar>, merchant_name -> Nullable<Varchar>,
merchant_details -> Nullable<Json>, merchant_details -> Nullable<Json>,
webhook_details -> Nullable<Json>, webhook_details -> Nullable<Json>,
sub_merchants_enabled -> Nullable<Bool>, sub_merchants_enabled -> Nullable<Bool>,
#[max_length = 64]
parent_merchant_id -> Nullable<Varchar>, parent_merchant_id -> Nullable<Varchar>,
#[max_length = 128]
publishable_key -> Nullable<Varchar>, publishable_key -> Nullable<Varchar>,
storage_scheme -> MerchantStorageScheme, storage_scheme -> MerchantStorageScheme,
#[max_length = 64]
locker_id -> Nullable<Varchar>, locker_id -> Nullable<Varchar>,
metadata -> Nullable<Jsonb>, metadata -> Nullable<Jsonb>,
routing_algorithm -> Nullable<Json>, routing_algorithm -> Nullable<Json>,
@ -262,18 +349,24 @@ diesel::table! {
merchant_connector_account (id) { merchant_connector_account (id) {
id -> Int4, id -> Int4,
#[max_length = 64]
merchant_id -> Varchar, merchant_id -> Varchar,
#[max_length = 64]
connector_name -> Varchar, connector_name -> Varchar,
connector_account_details -> Json, connector_account_details -> Json,
test_mode -> Nullable<Bool>, test_mode -> Nullable<Bool>,
disabled -> Nullable<Bool>, disabled -> Nullable<Bool>,
#[max_length = 128]
merchant_connector_id -> Varchar, merchant_connector_id -> Varchar,
payment_methods_enabled -> Nullable<Array<Nullable<Json>>>, payment_methods_enabled -> Nullable<Array<Nullable<Json>>>,
connector_type -> ConnectorType, connector_type -> ConnectorType,
metadata -> Nullable<Jsonb>, metadata -> Nullable<Jsonb>,
#[max_length = 255]
connector_label -> Varchar, connector_label -> Varchar,
business_country -> CountryAlpha2, business_country -> CountryAlpha2,
#[max_length = 255]
business_label -> Varchar, business_label -> Varchar,
#[max_length = 64]
business_sub_label -> Nullable<Varchar>, business_sub_label -> Nullable<Varchar>,
frm_configs -> Nullable<Jsonb>, frm_configs -> Nullable<Jsonb>,
created_at -> Timestamp, created_at -> Timestamp,
@ -287,20 +380,26 @@ diesel::table! {
payment_attempt (id) { payment_attempt (id) {
id -> Int4, id -> Int4,
#[max_length = 64]
payment_id -> Varchar, payment_id -> Varchar,
#[max_length = 64]
merchant_id -> Varchar, merchant_id -> Varchar,
#[max_length = 64]
attempt_id -> Varchar, attempt_id -> Varchar,
status -> AttemptStatus, status -> AttemptStatus,
amount -> Int8, amount -> Int8,
currency -> Nullable<Currency>, currency -> Nullable<Currency>,
save_to_locker -> Nullable<Bool>, save_to_locker -> Nullable<Bool>,
#[max_length = 64]
connector -> Nullable<Varchar>, connector -> Nullable<Varchar>,
error_message -> Nullable<Text>, error_message -> Nullable<Text>,
offer_amount -> Nullable<Int8>, offer_amount -> Nullable<Int8>,
surcharge_amount -> Nullable<Int8>, surcharge_amount -> Nullable<Int8>,
tax_amount -> Nullable<Int8>, tax_amount -> Nullable<Int8>,
#[max_length = 64]
payment_method_id -> Nullable<Varchar>, payment_method_id -> Nullable<Varchar>,
payment_method -> Nullable<Varchar>, payment_method -> Nullable<Varchar>,
#[max_length = 128]
connector_transaction_id -> Nullable<Varchar>, connector_transaction_id -> Nullable<Varchar>,
capture_method -> Nullable<CaptureMethod>, capture_method -> Nullable<CaptureMethod>,
capture_on -> Nullable<Timestamp>, capture_on -> Nullable<Timestamp>,
@ -309,16 +408,23 @@ diesel::table! {
created_at -> Timestamp, created_at -> Timestamp,
modified_at -> Timestamp, modified_at -> Timestamp,
last_synced -> Nullable<Timestamp>, last_synced -> Nullable<Timestamp>,
#[max_length = 255]
cancellation_reason -> Nullable<Varchar>, cancellation_reason -> Nullable<Varchar>,
amount_to_capture -> Nullable<Int8>, amount_to_capture -> Nullable<Int8>,
#[max_length = 64]
mandate_id -> Nullable<Varchar>, mandate_id -> Nullable<Varchar>,
browser_info -> Nullable<Jsonb>, browser_info -> Nullable<Jsonb>,
#[max_length = 255]
error_code -> Nullable<Varchar>, error_code -> Nullable<Varchar>,
#[max_length = 128]
payment_token -> Nullable<Varchar>, payment_token -> Nullable<Varchar>,
connector_metadata -> Nullable<Jsonb>, connector_metadata -> Nullable<Jsonb>,
#[max_length = 50]
payment_experience -> Nullable<Varchar>, payment_experience -> Nullable<Varchar>,
#[max_length = 64]
payment_method_type -> Nullable<Varchar>, payment_method_type -> Nullable<Varchar>,
payment_method_data -> Nullable<Jsonb>, payment_method_data -> Nullable<Jsonb>,
#[max_length = 64]
business_sub_label -> Nullable<Varchar>, business_sub_label -> Nullable<Varchar>,
straight_through_algorithm -> Nullable<Jsonb>, straight_through_algorithm -> Nullable<Jsonb>,
preprocessing_step_id -> Nullable<Varchar>, preprocessing_step_id -> Nullable<Varchar>,
@ -332,29 +438,42 @@ diesel::table! {
payment_intent (id) { payment_intent (id) {
id -> Int4, id -> Int4,
#[max_length = 64]
payment_id -> Varchar, payment_id -> Varchar,
#[max_length = 64]
merchant_id -> Varchar, merchant_id -> Varchar,
status -> IntentStatus, status -> IntentStatus,
amount -> Int8, amount -> Int8,
currency -> Nullable<Currency>, currency -> Nullable<Currency>,
amount_captured -> Nullable<Int8>, amount_captured -> Nullable<Int8>,
#[max_length = 64]
customer_id -> Nullable<Varchar>, customer_id -> Nullable<Varchar>,
#[max_length = 255]
description -> Nullable<Varchar>, description -> Nullable<Varchar>,
#[max_length = 255]
return_url -> Nullable<Varchar>, return_url -> Nullable<Varchar>,
metadata -> Nullable<Jsonb>, metadata -> Nullable<Jsonb>,
#[max_length = 64]
connector_id -> Nullable<Varchar>, connector_id -> Nullable<Varchar>,
#[max_length = 64]
shipping_address_id -> Nullable<Varchar>, shipping_address_id -> Nullable<Varchar>,
#[max_length = 64]
billing_address_id -> Nullable<Varchar>, billing_address_id -> Nullable<Varchar>,
#[max_length = 255]
statement_descriptor_name -> Nullable<Varchar>, statement_descriptor_name -> Nullable<Varchar>,
#[max_length = 255]
statement_descriptor_suffix -> Nullable<Varchar>, statement_descriptor_suffix -> Nullable<Varchar>,
created_at -> Timestamp, created_at -> Timestamp,
modified_at -> Timestamp, modified_at -> Timestamp,
last_synced -> Nullable<Timestamp>, last_synced -> Nullable<Timestamp>,
setup_future_usage -> Nullable<FutureUsage>, setup_future_usage -> Nullable<FutureUsage>,
off_session -> Nullable<Bool>, off_session -> Nullable<Bool>,
#[max_length = 128]
client_secret -> Nullable<Varchar>, client_secret -> Nullable<Varchar>,
#[max_length = 64]
active_attempt_id -> Varchar, active_attempt_id -> Varchar,
business_country -> CountryAlpha2, business_country -> CountryAlpha2,
#[max_length = 64]
business_label -> Varchar, business_label -> Varchar,
} }
} }
@ -365,23 +484,34 @@ diesel::table! {
payment_methods (id) { payment_methods (id) {
id -> Int4, id -> Int4,
#[max_length = 64]
customer_id -> Varchar, customer_id -> Varchar,
#[max_length = 64]
merchant_id -> Varchar, merchant_id -> Varchar,
#[max_length = 64]
payment_method_id -> Varchar, payment_method_id -> Varchar,
accepted_currency -> Nullable<Array<Nullable<Currency>>>, accepted_currency -> Nullable<Array<Nullable<Currency>>>,
#[max_length = 32]
scheme -> Nullable<Varchar>, scheme -> Nullable<Varchar>,
#[max_length = 128]
token -> Nullable<Varchar>, token -> Nullable<Varchar>,
#[max_length = 255]
cardholder_name -> Nullable<Varchar>, cardholder_name -> Nullable<Varchar>,
#[max_length = 64]
issuer_name -> Nullable<Varchar>, issuer_name -> Nullable<Varchar>,
#[max_length = 64]
issuer_country -> Nullable<Varchar>, issuer_country -> Nullable<Varchar>,
payer_country -> Nullable<Array<Nullable<Text>>>, payer_country -> Nullable<Array<Nullable<Text>>>,
is_stored -> Nullable<Bool>, is_stored -> Nullable<Bool>,
#[max_length = 32]
swift_code -> Nullable<Varchar>, swift_code -> Nullable<Varchar>,
#[max_length = 128]
direct_debit_token -> Nullable<Varchar>, direct_debit_token -> Nullable<Varchar>,
created_at -> Timestamp, created_at -> Timestamp,
last_modified -> Timestamp, last_modified -> Timestamp,
payment_method -> Varchar, payment_method -> Varchar,
payment_method_type -> Nullable<Varchar>, payment_method_type -> Nullable<Varchar>,
#[max_length = 128]
payment_method_issuer -> Nullable<Varchar>, payment_method_issuer -> Nullable<Varchar>,
payment_method_issuer_code -> Nullable<PaymentMethodIssuerCode>, payment_method_issuer_code -> Nullable<PaymentMethodIssuerCode>,
metadata -> Nullable<Json>, metadata -> Nullable<Json>,
@ -393,14 +523,19 @@ diesel::table! {
use crate::enums::diesel_exports::*; use crate::enums::diesel_exports::*;
process_tracker (id) { process_tracker (id) {
#[max_length = 127]
id -> Varchar, id -> Varchar,
#[max_length = 64]
name -> Nullable<Varchar>, name -> Nullable<Varchar>,
tag -> Array<Nullable<Text>>, tag -> Array<Nullable<Text>>,
#[max_length = 64]
runner -> Nullable<Varchar>, runner -> Nullable<Varchar>,
retry_count -> Int4, retry_count -> Int4,
schedule_time -> Nullable<Timestamp>, schedule_time -> Nullable<Timestamp>,
#[max_length = 255]
rule -> Varchar, rule -> Varchar,
tracking_data -> Json, tracking_data -> Json,
#[max_length = 255]
business_status -> Varchar, business_status -> Varchar,
status -> ProcessTrackerStatus, status -> ProcessTrackerStatus,
event -> Array<Nullable<Text>>, event -> Array<Nullable<Text>>,
@ -415,13 +550,21 @@ diesel::table! {
refund (id) { refund (id) {
id -> Int4, id -> Int4,
#[max_length = 64]
internal_reference_id -> Varchar, internal_reference_id -> Varchar,
#[max_length = 64]
refund_id -> Varchar, refund_id -> Varchar,
#[max_length = 64]
payment_id -> Varchar, payment_id -> Varchar,
#[max_length = 64]
merchant_id -> Varchar, merchant_id -> Varchar,
#[max_length = 128]
connector_transaction_id -> Varchar, connector_transaction_id -> Varchar,
#[max_length = 64]
connector -> Varchar, connector -> Varchar,
#[max_length = 128]
connector_refund_id -> Nullable<Varchar>, connector_refund_id -> Nullable<Varchar>,
#[max_length = 64]
external_reference_id -> Nullable<Varchar>, external_reference_id -> Nullable<Varchar>,
refund_type -> RefundType, refund_type -> RefundType,
total_amount -> Int8, total_amount -> Int8,
@ -431,11 +574,15 @@ diesel::table! {
sent_to_gateway -> Bool, sent_to_gateway -> Bool,
refund_error_message -> Nullable<Text>, refund_error_message -> Nullable<Text>,
metadata -> Nullable<Json>, metadata -> Nullable<Json>,
#[max_length = 128]
refund_arn -> Nullable<Varchar>, refund_arn -> Nullable<Varchar>,
created_at -> Timestamp, created_at -> Timestamp,
modified_at -> Timestamp, modified_at -> Timestamp,
#[max_length = 255]
description -> Nullable<Varchar>, description -> Nullable<Varchar>,
#[max_length = 64]
attempt_id -> Varchar, attempt_id -> Varchar,
#[max_length = 255]
refund_reason -> Nullable<Varchar>, refund_reason -> Nullable<Varchar>,
refund_error_code -> Nullable<Text>, refund_error_code -> Nullable<Text>,
} }
@ -446,9 +593,13 @@ diesel::table! {
use crate::enums::diesel_exports::*; use crate::enums::diesel_exports::*;
reverse_lookup (lookup_id) { reverse_lookup (lookup_id) {
#[max_length = 128]
lookup_id -> Varchar, lookup_id -> Varchar,
#[max_length = 128]
sk_id -> Varchar, sk_id -> Varchar,
#[max_length = 128]
pk_id -> Varchar, pk_id -> Varchar,
#[max_length = 128]
source -> Varchar, source -> Varchar,
} }
} }