fix(core): drop three_dsserver_trans_id from authentication table (#4587)

This commit is contained in:
Hrithikesh
2024-05-08 19:06:07 +05:30
committed by GitHub
parent dca15aeeb5
commit ec3b60e37c
7 changed files with 5 additions and 10 deletions

View File

@ -38,7 +38,6 @@ pub struct Authentication {
pub challenge_request: Option<String>,
pub acs_reference_number: Option<String>,
pub acs_trans_id: Option<String>,
pub three_ds_server_trans_id: Option<String>,
pub acs_signed_content: Option<String>,
pub profile_id: String,
pub payment_id: Option<String>,
@ -83,7 +82,6 @@ pub struct AuthenticationNew {
pub challenge_request: Option<String>,
pub acs_reference_number: Option<String>,
pub acs_trans_id: Option<String>,
pub three_dsserver_trans_id: Option<String>,
pub acs_signed_content: Option<String>,
pub profile_id: String,
pub payment_id: Option<String>,
@ -160,7 +158,6 @@ pub struct AuthenticationUpdateInternal {
pub challenge_request: Option<String>,
pub acs_reference_number: Option<String>,
pub acs_trans_id: Option<String>,
pub three_dsserver_trans_id: Option<String>,
pub acs_signed_content: Option<String>,
}
@ -191,7 +188,6 @@ impl Default for AuthenticationUpdateInternal {
challenge_request: Default::default(),
acs_reference_number: Default::default(),
acs_trans_id: Default::default(),
three_dsserver_trans_id: Default::default(),
acs_signed_content: Default::default(),
}
}
@ -224,7 +220,6 @@ impl AuthenticationUpdateInternal {
challenge_request,
acs_reference_number,
acs_trans_id,
three_dsserver_trans_id,
acs_signed_content,
} = self;
Authentication {
@ -256,7 +251,6 @@ impl AuthenticationUpdateInternal {
challenge_request: challenge_request.or(source.challenge_request),
acs_reference_number: acs_reference_number.or(source.acs_reference_number),
acs_trans_id: acs_trans_id.or(source.acs_trans_id),
three_ds_server_trans_id: three_dsserver_trans_id.or(source.three_ds_server_trans_id),
acs_signed_content: acs_signed_content.or(source.acs_signed_content),
..source
}

View File

@ -108,7 +108,6 @@ diesel::table! {
challenge_request -> Nullable<Varchar>,
acs_reference_number -> Nullable<Varchar>,
acs_trans_id -> Nullable<Varchar>,
three_dsserver_trans_id -> Nullable<Varchar>,
acs_signed_content -> Nullable<Varchar>,
#[max_length = 64]
profile_id -> Varchar,

View File

@ -177,7 +177,6 @@ pub async fn create_new_authentication(
challenge_request: None,
acs_reference_number: None,
acs_trans_id: None,
three_dsserver_trans_id: None,
acs_signed_content: None,
profile_id,
payment_id,

View File

@ -143,7 +143,6 @@ impl AuthenticationInterface for MockDb {
challenge_request: authentication.challenge_request,
acs_reference_number: authentication.acs_reference_number,
acs_trans_id: authentication.acs_trans_id,
three_ds_server_trans_id: authentication.three_dsserver_trans_id,
acs_signed_content: authentication.acs_signed_content,
profile_id: authentication.profile_id,
payment_id: authentication.payment_id,

View File

@ -50,7 +50,7 @@ impl TryFrom<storage::Authentication> for AuthenticationResponse {
challenge_request: authentication.challenge_request,
acs_reference_number: authentication.acs_reference_number,
acs_trans_id: authentication.acs_trans_id,
three_dsserver_trans_id: authentication.three_ds_server_trans_id,
three_dsserver_trans_id: authentication.threeds_server_transaction_id,
acs_signed_content: authentication.acs_signed_content,
})
}

View File

@ -0,0 +1,2 @@
-- This file should undo anything in `up.sql`
ALTER TABLE authentication ADD COLUMN three_dsserver_trans_id VARCHAR;

View File

@ -0,0 +1,2 @@
-- Your SQL goes here
ALTER TABLE authentication DROP COLUMN three_dsserver_trans_id;