diff --git a/migration/1701689359018-add_fields_to_qf_round_history.ts b/migration/1701689359018-add_fields_to_qf_round_history.ts index 8ae006cb7..ecb9e4046 100644 --- a/migration/1701689359018-add_fields_to_qf_round_history.ts +++ b/migration/1701689359018-add_fields_to_qf_round_history.ts @@ -32,7 +32,7 @@ export class addFieldsToQfRoundHistory1701689359018 "matchingFundPriceUsd" = 1, "matchingFundCurrency" = 'WXDAI' WHERE - id = 2 AND "matchingFund" IS NOT NULL; + "qfRoundId" = 2 AND "matchingFund" IS NOT NULL; `); @@ -44,7 +44,7 @@ export class addFieldsToQfRoundHistory1701689359018 "matchingFundPriceUsd" = 1, "matchingFundCurrency" = 'DAI' WHERE - id = 4 AND "matchingFund" IS NOT NULL; + "qfRoundId" = 4 AND "matchingFund" IS NOT NULL; `); } diff --git a/src/services/donationService.ts b/src/services/donationService.ts index ab5c22fd3..dbcaff20f 100644 --- a/src/services/donationService.ts +++ b/src/services/donationService.ts @@ -523,9 +523,9 @@ export const insertDonationsFromQfRoundHistory = async (): Promise => { NOW() FROM "qf_round_history" q - LEFT JOIN "project" p ON q."projectId" = p."id" - LEFT JOIN "user" u ON u."id" = ${user.id} - LEFT JOIN "project_address" pa ON pa."projectId" = p."id" AND pa."networkId" = CAST(q."distributedFundNetwork" AS INTEGER) + INNER JOIN "project" p ON q."projectId" = p."id" + INNER JOIN "user" u ON u."id" = ${user.id} + INNER JOIN "project_address" pa ON pa."projectId" = p."id" AND pa."networkId" = CAST(q."distributedFundNetwork" AS INTEGER) WHERE q."distributedFundTxHash" IS NOT NULL AND q."matchingFundAmount" IS NOT NULL AND