-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Changed restriction code `SINF` to `SINR` - Updated the activity page accordion code to `SINR` - Created a DB migration to change the code of the `SINF` to `SINR`. - Renamed `SINF` to `SINR` in the existing `RestrictionCode` enum. - Changed an existing E2E to ensure `SINF` will be mapped to `LGCY`. - Replaced "TREE" with "SINF" in file "SFAS-TO-SIMS-2024MAR07-LEGACY-RESTRICTIONS.txt" to ensure `SINF` mapping to `LGCY` for this PR. ### Rollback evidence screenshot ![image](https://github.com/user-attachments/assets/2002ad83-4af3-4ab5-9b9c-3226e02b28e8) Screenshot of the SINR code on the activity page accordion ![image](https://github.com/user-attachments/assets/c1b4028c-c92b-447a-b417-a10fc8c75f04) Screenshot of the `sfas_student` table having two records after restrictions are imported ![image](https://github.com/user-attachments/assets/1b0d2812-3944-4a15-9641-fabe894cbcf4) Screenshot of the `student_restrictions` table having only one record with restriction_id = 72 (LGCY) ![image](https://github.com/user-attachments/assets/20e3396d-96db-4190-941a-9e597f945ba8) Screenshot of the completed job for processing the SINR record on Bull Dashboard ![image](https://github.com/user-attachments/assets/50db6edd-3070-4e25-80c3-db1ff1a60be0)
- Loading branch information
1 parent
81df5b5
commit 3ed8c2e
Showing
7 changed files
with
35 additions
and
5 deletions.
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
16 changes: 16 additions & 0 deletions
16
.../packages/backend/apps/db-migrations/src/migrations/1730141787641-UpdateSINRestriction.ts
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,16 @@ | ||
import { MigrationInterface, QueryRunner } from "typeorm"; | ||
import { getSQLFileData } from "../utilities/sqlLoader"; | ||
|
||
export class UpdateSINRestriction1730141787641 implements MigrationInterface { | ||
public async up(queryRunner: QueryRunner): Promise<void> { | ||
await queryRunner.query( | ||
getSQLFileData("Update-sin-restriction.sql", "Restrictions"), | ||
); | ||
} | ||
|
||
public async down(queryRunner: QueryRunner): Promise<void> { | ||
await queryRunner.query( | ||
getSQLFileData("Rollback-update-sin-restriction.sql", "Restrictions"), | ||
); | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
...kages/backend/apps/db-migrations/src/sql/Restrictions/Rollback-update-sin-restriction.sql
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,7 @@ | ||
-- Revert the updates for the restriction SINR | ||
UPDATE | ||
sims.restrictions | ||
SET | ||
restriction_code = 'SINF' | ||
WHERE | ||
restriction_code = 'SINR'; |
7 changes: 7 additions & 0 deletions
7
sources/packages/backend/apps/db-migrations/src/sql/Restrictions/Update-sin-restriction.sql
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,7 @@ | ||
-- Update restriction_code for the restriction code SINF | ||
UPDATE | ||
sims.restrictions | ||
SET | ||
restriction_code = 'SINR' | ||
WHERE | ||
restriction_code = 'SINF'; |
2 changes: 1 addition & 1 deletion
2
...dulers/sfas-integration/_tests_/sfas-files/SFAS-TO-SIMS-2024MAR07-LEGACY-RESTRICTIONS.txt
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
100AESTSFAS TO SIMS BRIDGE 20211119142437 | ||
2001010101010JOHN FOUR 19980324900041310 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 | ||
40010101010100964351111TREE20180927 | ||
40010101010100964351111SINF20180927 | ||
40010101010100964351115CROW20180928 | ||
999000011431002573803010624 |
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