-
Notifications
You must be signed in to change notification settings - Fork 14
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
#1761 - Handling full time BCSL lifetime and federal maximums - DB migrations #1860
Conversation
...s/db-migrations/src/sql/DisbursementValues/Add-restriction-amount-and-id-subtracted-cols.sql
Outdated
Show resolved
Hide resolved
.../packages/backend/apps/db-migrations/src/sql/ProgramYear/Add-max-lifetime-bc-loan-amount.sql
Outdated
Show resolved
Hide resolved
@@ -14,5 +15,6 @@ export function createFakeProgramYear(programYearPrefix?: number): ProgramYear { | |||
programYear.parentFormName = `${programYear.formName}-parent`; | |||
programYear.partnerFormName = `${programYear.formName}-partner`; | |||
programYear.programYearPrefix = programYearPrefix.toString(); | |||
programYear.maxLifetimeBCLoanAmount = faker.random.number(100000); |
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 believe we can give an actual number rather giving a random number. As during the lifetime maximums calculations, if this is created, it will be helpful to do the expect.
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.
It will not always be 50,000 for future program years I guess. but I got the point, I will change
) | ||
VALUES | ||
( | ||
'Provincial', |
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.
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.
ya, I will add it. Thanks for the point. And I think we need to review the codes there in the UI, a few days back, when I was trying to find the details for a code, I couldn't find it there.
nullable: true, | ||
transformer: numericTransformer, |
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.
Nice catch 😉
restrictionAmountSubtracted?: number; | ||
/** | ||
* References the restriction related to the disbursement | ||
* due to which the amount for subtracted. |
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.
The "for" here seems lost, is it supposed to be "due to which the amount was subtracted"?
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.
updating to
* References the restriction related to the disbursement due to which the amount was subtracted.
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.
Looks good, just remove the additional white spaces in the middle of the proposed sentence.
sources/packages/backend/libs/sims-db/src/entities/disbursement-values.model.ts
Outdated
Show resolved
Hide resolved
...ces/packages/backend/apps/db-migrations/src/sql/Restrictions/Update-and-add-restrictions.sql
Outdated
Show resolved
Hide resolved
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.
Nice work, just minor comments.
ALTER TABLE | ||
sims.program_years | ||
ADD | ||
COLUMN max_lifetime_bc_loan_amount NUMERIC(8, 2) NOT NULL DEFAULT 0; |
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 can default it to 50000 and skip the update query below.
sources/packages/backend/libs/sims-db/src/entities/disbursement-values.model.ts
Show resolved
Hide resolved
Nice work @ann-aot . few minor comments. Also there is minor sonar cloud code smell on import. |
) | ||
restrictionIdSubtracted?: number; | ||
/** | ||
*Restriction id due to which the award amount was reduced. |
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.
Please add a white space after the "*".
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.
Thanks for doing the changes, looks good 👍
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.
Thanks for making the changes. LGTM. 👍
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.
LGTM!
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.
LGTM, nice work @ann-aot
Kudos, SonarCloud Quality Gate passed!
|
IF EXISTS
in the queriesnumericTransformer
to numeric fieldtuition_remittance_effective_amount
UPDATE:
resctrictionCatergory
updated toOther
for the new restrictionBCLM
upon confirmation