-
Notifications
You must be signed in to change notification settings - Fork 40
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
17534 - nsf tweaks #1385
Merged
Merged
17534 - nsf tweaks #1385
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
ba4aed4
nsf tweaks
rodrigo-barraza f6ca080
Lint fixes and migration script fix
rodrigo-barraza 1a0a3bf
cfs_account_id to cfs_account
rodrigo-barraza 1e04af5
Reverse payment_reconciliations
rodrigo-barraza 1b5c327
Test fix
rodrigo-barraza 8baf160
More nsf tweaks
rodrigo-barraza 08fa1e6
Test tweak
rodrigo-barraza d8d0844
test tweaks
rodrigo-barraza 85d6dbe
test tweaks
rodrigo-barraza eb28cd2
test tweaks
rodrigo-barraza 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
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,33 @@ | ||
"""Add cfs_account and modify invoice_number to be non-nullable in non_sufficient_funds table | ||
|
||
Revision ID: 0b1f9c35b1fb | ||
Revises: fccdab259e05 | ||
Create Date: 2024-01-23 14:26:29.427462 | ||
|
||
""" | ||
from alembic import op | ||
import sqlalchemy as sa | ||
from sqlalchemy.dialects import postgresql | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = '0b1f9c35b1fb' | ||
down_revision = 'fccdab259e05' | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade(): | ||
op.add_column('non_sufficient_funds', sa.Column('cfs_account', sa.String(length=50), nullable=True, | ||
comment='CFS Account number')) | ||
op.alter_column('non_sufficient_funds', 'invoice_number', | ||
existing_type=sa.VARCHAR(length=50), | ||
nullable=False, | ||
existing_comment='CFS Invoice number') | ||
|
||
|
||
def downgrade(): | ||
op.alter_column('non_sufficient_funds', 'invoice_number', | ||
existing_type=sa.VARCHAR(length=50), | ||
nullable=True, | ||
existing_comment='CFS Invoice number') | ||
op.drop_column('non_sufficient_funds', 'cfs_account') |
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.
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.
Still need invoice id?
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.
We could do away with it if there is no need for OPS to have this information about a specific invoice, and we're currently still using it on the DB queries (but could query around it).
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.
I think it's a bit confusing to leave it in there (or at least as invoice_id), because the NSF pertains to multiple invoice ids (grouped up by the invoice_number) and you're not creating multiple rows.. Maybe we could use a better name for it instead?
nsf_fee_invoice_id
? that way it's distinct from the other invoice_ids that are NSF