From 050433044a2c1d7991c8d55158aebad86e739047 Mon Sep 17 00:00:00 2001 From: Tristan Slater <1631008+trslater@users.noreply.github.com> Date: Mon, 28 Oct 2024 12:50:06 -0700 Subject: [PATCH] Fix selected ETL missed review deletions - When an app is returned from L/FNG, normally the review is deleted - This was missed in ETL - Any apps where a *second* L/FNG review was not yet started will be unable to start, since the old one already exists, creating a foreign key constraint validation --- ...4741773-fix_etl_missed_deleting_lfgn_reviews.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 services/apps/alcs/src/providers/typeorm/migrations/1730144741773-fix_etl_missed_deleting_lfgn_reviews.ts diff --git a/services/apps/alcs/src/providers/typeorm/migrations/1730144741773-fix_etl_missed_deleting_lfgn_reviews.ts b/services/apps/alcs/src/providers/typeorm/migrations/1730144741773-fix_etl_missed_deleting_lfgn_reviews.ts new file mode 100644 index 0000000000..fbf83dd64b --- /dev/null +++ b/services/apps/alcs/src/providers/typeorm/migrations/1730144741773-fix_etl_missed_deleting_lfgn_reviews.ts @@ -0,0 +1,14 @@ +import { MigrationInterface, QueryRunner } from 'typeorm'; + +export class FixEtlMissedDeletingLfgnReviews1730144741773 + implements MigrationInterface +{ + public async up(queryRunner: QueryRunner): Promise { + queryRunner.query(` + delete from alcs.application_submission_review asr + where asr.application_file_number in ('61301', '67497') + `); + } + + public async down(queryRunner: QueryRunner): Promise {} +}