Skip to content

Commit ec3b60e

Browse files
fix(core): drop three_dsserver_trans_id from authentication table (#4587)
1 parent dca15ae commit ec3b60e

File tree

7 files changed

+5
-10
lines changed

7 files changed

+5
-10
lines changed

crates/diesel_models/src/authentication.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ pub struct Authentication {
3838
pub challenge_request: Option<String>,
3939
pub acs_reference_number: Option<String>,
4040
pub acs_trans_id: Option<String>,
41-
pub three_ds_server_trans_id: Option<String>,
4241
pub acs_signed_content: Option<String>,
4342
pub profile_id: String,
4443
pub payment_id: Option<String>,
@@ -83,7 +82,6 @@ pub struct AuthenticationNew {
8382
pub challenge_request: Option<String>,
8483
pub acs_reference_number: Option<String>,
8584
pub acs_trans_id: Option<String>,
86-
pub three_dsserver_trans_id: Option<String>,
8785
pub acs_signed_content: Option<String>,
8886
pub profile_id: String,
8987
pub payment_id: Option<String>,
@@ -160,7 +158,6 @@ pub struct AuthenticationUpdateInternal {
160158
pub challenge_request: Option<String>,
161159
pub acs_reference_number: Option<String>,
162160
pub acs_trans_id: Option<String>,
163-
pub three_dsserver_trans_id: Option<String>,
164161
pub acs_signed_content: Option<String>,
165162
}
166163

@@ -191,7 +188,6 @@ impl Default for AuthenticationUpdateInternal {
191188
challenge_request: Default::default(),
192189
acs_reference_number: Default::default(),
193190
acs_trans_id: Default::default(),
194-
three_dsserver_trans_id: Default::default(),
195191
acs_signed_content: Default::default(),
196192
}
197193
}
@@ -224,7 +220,6 @@ impl AuthenticationUpdateInternal {
224220
challenge_request,
225221
acs_reference_number,
226222
acs_trans_id,
227-
three_dsserver_trans_id,
228223
acs_signed_content,
229224
} = self;
230225
Authentication {
@@ -256,7 +251,6 @@ impl AuthenticationUpdateInternal {
256251
challenge_request: challenge_request.or(source.challenge_request),
257252
acs_reference_number: acs_reference_number.or(source.acs_reference_number),
258253
acs_trans_id: acs_trans_id.or(source.acs_trans_id),
259-
three_ds_server_trans_id: three_dsserver_trans_id.or(source.three_ds_server_trans_id),
260254
acs_signed_content: acs_signed_content.or(source.acs_signed_content),
261255
..source
262256
}

crates/diesel_models/src/schema.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,6 @@ diesel::table! {
108108
challenge_request -> Nullable<Varchar>,
109109
acs_reference_number -> Nullable<Varchar>,
110110
acs_trans_id -> Nullable<Varchar>,
111-
three_dsserver_trans_id -> Nullable<Varchar>,
112111
acs_signed_content -> Nullable<Varchar>,
113112
#[max_length = 64]
114113
profile_id -> Varchar,

crates/router/src/core/authentication/utils.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,6 @@ pub async fn create_new_authentication(
177177
challenge_request: None,
178178
acs_reference_number: None,
179179
acs_trans_id: None,
180-
three_dsserver_trans_id: None,
181180
acs_signed_content: None,
182181
profile_id,
183182
payment_id,

crates/router/src/db/authentication.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,6 @@ impl AuthenticationInterface for MockDb {
143143
challenge_request: authentication.challenge_request,
144144
acs_reference_number: authentication.acs_reference_number,
145145
acs_trans_id: authentication.acs_trans_id,
146-
three_ds_server_trans_id: authentication.three_dsserver_trans_id,
147146
acs_signed_content: authentication.acs_signed_content,
148147
profile_id: authentication.profile_id,
149148
payment_id: authentication.payment_id,

crates/router/src/types/api/authentication.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ impl TryFrom<storage::Authentication> for AuthenticationResponse {
5050
challenge_request: authentication.challenge_request,
5151
acs_reference_number: authentication.acs_reference_number,
5252
acs_trans_id: authentication.acs_trans_id,
53-
three_dsserver_trans_id: authentication.three_ds_server_trans_id,
53+
three_dsserver_trans_id: authentication.threeds_server_transaction_id,
5454
acs_signed_content: authentication.acs_signed_content,
5555
})
5656
}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
-- This file should undo anything in `up.sql`
2+
ALTER TABLE authentication ADD COLUMN three_dsserver_trans_id VARCHAR;
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
-- Your SQL goes here
2+
ALTER TABLE authentication DROP COLUMN three_dsserver_trans_id;

0 commit comments

Comments
 (0)