Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(core): Add column mandate_data for storing the details of a mandate in PaymentAttempt #3606

Merged
merged 5 commits into from
Feb 9, 2024

Conversation

Aprabhat19
Copy link
Contributor

@Aprabhat19 Aprabhat19 commented Feb 9, 2024

Type of Change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring
  • Dependency updates
  • Documentation
  • CI/CD

Description

To make the mandate_details forward compatible , instead of storing update mandate id in mandate details we store it in the new column mandate data. Currently in mandate_data column we only store update_mandate_id

Additional Changes

  • This PR modifies the API contract
  • This PR modifies the database schema
  • This PR modifies application configuration/environment variables

Motivation and Context

How did you test it?

  • Create an MA and an MCA
  • Make a mandate_payment
  • And then make an update_mandate_payment with the mandate_id generated in the previous step
  • The card would be updated and reflected when we do list mandate
Screenshot 2024-02-09 at 1 08 48 PM

Screenshot 2024-02-09 at 1 11 56 PM

Screenshot 2024-02-09 at 1 12 35 PM

Screenshot 2024-02-09 at 1 13 19 PM

Checklist

  • I formatted the code cargo +nightly fmt --all
  • I addressed lints thrown by cargo clippy
  • I reviewed the submitted code
  • I added unit tests for my changes where possible
  • I added a CHANGELOG entry if applicable

@Aprabhat19 Aprabhat19 requested review from a team as code owners February 9, 2024 05:57
@Aprabhat19 Aprabhat19 self-assigned this Feb 9, 2024
@Aprabhat19 Aprabhat19 added A-core Area: Core flows C-bug Category: Bug S-waiting-on-review Status: This PR has been implemented and needs to be reviewed M-database-changes Metadata: This PR involves database schema changes labels Feb 9, 2024
@@ -0,0 +1,3 @@
-- Your SQL goes here
ALTER TABLE payment_attempt
ADD COLUMN IF NOT EXISTS mandate_data JSONB DEFAULT NULL
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
ADD COLUMN IF NOT EXISTS mandate_data JSONB DEFAULT NULL
ADD COLUMN IF NOT EXISTS mandate_data JSONB DEFAULT NULL;

@@ -0,0 +1,2 @@
-- This file should undo anything in `up.sql`
ALTER TABLE payment_attempt DROP COLUMN IF EXISTS mandate_data
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
ALTER TABLE payment_attempt DROP COLUMN IF EXISTS mandate_data
ALTER TABLE payment_attempt DROP COLUMN IF EXISTS mandate_data;

Copy link
Contributor

@ThisIsMani ThisIsMani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dashboard specific changes seems fine.

@Gnanasundari24 Gnanasundari24 added this pull request to the merge queue Feb 9, 2024
Merged via the queue into main with commit 74f3721 Feb 9, 2024
13 of 15 checks passed
@Gnanasundari24 Gnanasundari24 deleted the add-colum-for-update branch February 9, 2024 08:49
@SanchithHegde SanchithHegde removed the S-waiting-on-review Status: This PR has been implemented and needs to be reviewed label Feb 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-core Area: Core flows C-bug Category: Bug M-database-changes Metadata: This PR involves database schema changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEATURE] Add new column in PaymentAttempt for storing mandate_data
6 participants