Skip to content

Commit db5a2de

Browse files
committed
chore: re-run migration
1 parent 03bd857 commit db5a2de

File tree

3 files changed

+5
-9
lines changed

3 files changed

+5
-9
lines changed

crates/diesel_models/src/query/payouts.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -102,15 +102,11 @@ impl Payouts {
102102
status: Option<Vec<enums::PayoutStatus>>,
103103
payout_type: Option<Vec<enums::PayoutType>>,
104104
) -> StorageResult<i64> {
105-
let active_payout_ids_str: Vec<String> = active_payout_ids
106-
.iter()
107-
.map(|pid| pid.get_string_repr().to_string())
108-
.collect();
109105
let mut filter = <Self as HasTable>::table()
110106
.inner_join(payout_attempt::table.on(payout_attempt::dsl::payout_id.eq(dsl::payout_id)))
111107
.count()
112108
.filter(dsl::merchant_id.eq(merchant_id.to_owned()))
113-
.filter(dsl::payout_id.eq_any(active_payout_ids_str))
109+
.filter(dsl::payout_id.eq_any(active_payout_ids.to_vec()))
114110
.into_boxed();
115111

116112
if let Some(connector) = connector {

crates/diesel_models/src/schema.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1142,7 +1142,7 @@ diesel::table! {
11421142
use diesel::sql_types::*;
11431143
use crate::enums::diesel_exports::*;
11441144

1145-
payout_attempt (payout_attempt_id, merchant_id) {
1145+
payout_attempt (merchant_id, payout_attempt_id) {
11461146
#[max_length = 64]
11471147
payout_attempt_id -> Varchar,
11481148
#[max_length = 64]
@@ -1188,7 +1188,7 @@ diesel::table! {
11881188
use diesel::sql_types::*;
11891189
use crate::enums::diesel_exports::*;
11901190

1191-
payouts (payout_id, merchant_id) {
1191+
payouts (merchant_id, payout_id) {
11921192
#[max_length = 64]
11931193
payout_id -> Varchar,
11941194
#[max_length = 64]

crates/diesel_models/src/schema_v2.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1082,7 +1082,7 @@ diesel::table! {
10821082
use diesel::sql_types::*;
10831083
use crate::enums::diesel_exports::*;
10841084

1085-
payout_attempt (payout_attempt_id, merchant_id) {
1085+
payout_attempt (merchant_id, payout_attempt_id) {
10861086
#[max_length = 64]
10871087
payout_attempt_id -> Varchar,
10881088
#[max_length = 64]
@@ -1128,7 +1128,7 @@ diesel::table! {
11281128
use diesel::sql_types::*;
11291129
use crate::enums::diesel_exports::*;
11301130

1131-
payouts (payout_id, merchant_id) {
1131+
payouts (merchant_id, payout_id) {
11321132
#[max_length = 64]
11331133
payout_id -> Varchar,
11341134
#[max_length = 64]

0 commit comments

Comments
 (0)