-
Notifications
You must be signed in to change notification settings - Fork 39
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
21539 - Short name refund history support #1757
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
34 changes: 34 additions & 0 deletions
34
pay-api/migrations/versions/2024_09_18_67407611eec8_21539_shortname_refund_history.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
"""EFT Short name history short name refund. | ||
|
||
Revision ID: 67407611eec8 | ||
Revises: 423a9f909079 | ||
Create Date: 2024-09-18 10:20:15.689980 | ||
|
||
""" | ||
from alembic import op | ||
import sqlalchemy as sa | ||
|
||
|
||
# revision identifiers, used by Alembic. | ||
# Note you may see foreign keys with distribution_codes_history | ||
# For disbursement_distribution_code_id, service_fee_distribution_code_id | ||
# Please ignore those lines and don't include in migration. | ||
|
||
revision = '67407611eec8' | ||
down_revision = '423a9f909079' | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade(): | ||
with op.batch_alter_table('eft_short_names_historical', schema=None) as batch_op: | ||
batch_op.add_column(sa.Column('eft_refund_id', sa.Integer(), nullable=True)) | ||
batch_op.create_index(batch_op.f('ix_eft_short_names_historical_eft_refund_id'), ['eft_refund_id'], unique=False) | ||
batch_op.create_foreign_key('eft_short_names_historical_eft_refund_id_fkey', 'eft_refunds', ['eft_refund_id'], ['id']) | ||
|
||
|
||
def downgrade(): | ||
with op.batch_alter_table('eft_short_names_historical', schema=None) as batch_op: | ||
batch_op.drop_constraint('eft_short_names_historical_eft_refund_id_fkey', type_='foreignkey') | ||
batch_op.drop_index(batch_op.f('ix_eft_short_names_historical_eft_refund_id')) | ||
batch_op.drop_column('eft_refund_id') |
30 changes: 30 additions & 0 deletions
30
pay-api/migrations/versions/2024_09_19_29f59e6f147b_EFT_Refunds.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
"""EFT Refunds additional columns | ||
|
||
Revision ID: 29f59e6f147b | ||
Revises: 67407611eec8 | ||
Create Date: 2024-09-19 16:09:53.120704 | ||
|
||
""" | ||
from alembic import op | ||
import sqlalchemy as sa | ||
|
||
|
||
# revision identifiers, used by Alembic. | ||
|
||
revision = '29f59e6f147b' | ||
down_revision = '67407611eec8' | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade(): | ||
|
||
with op.batch_alter_table('eft_refunds', schema=None) as batch_op: | ||
batch_op.add_column(sa.Column('decline_reason', sa.String(), nullable=True)) | ||
batch_op.add_column(sa.Column('created_by', sa.String(length=100), nullable=True)) | ||
|
||
|
||
def downgrade(): | ||
with op.batch_alter_table('eft_refunds', schema=None) as batch_op: | ||
batch_op.drop_column('created_by') | ||
batch_op.drop_column('decline_reason') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When implementing approve/decline we need to find this history record by eft_refund_id and update the status.
For decline, we will need to return the refund amount back to the short name as well