From 01d1a046a5254501141602fd0f4f7d61e07e1909 Mon Sep 17 00:00:00 2001 From: Felipe Barreta Date: Mon, 2 Dec 2024 11:18:54 -0800 Subject: [PATCH 1/2] ALCS-2092 New changes to accommodate the data type fields --- .../1733163698882-add_date_and_admin_fee.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 services/apps/alcs/src/providers/typeorm/migrations/1733163698882-add_date_and_admin_fee.ts diff --git a/services/apps/alcs/src/providers/typeorm/migrations/1733163698882-add_date_and_admin_fee.ts b/services/apps/alcs/src/providers/typeorm/migrations/1733163698882-add_date_and_admin_fee.ts new file mode 100644 index 0000000000..42a6fef538 --- /dev/null +++ b/services/apps/alcs/src/providers/typeorm/migrations/1733163698882-add_date_and_admin_fee.ts @@ -0,0 +1,14 @@ +import { MigrationInterface, QueryRunner } from "typeorm"; + +export class AddDateAndAdminFee1733163698882 implements MigrationInterface { + + public async up(queryRunner: QueryRunner): Promise { + await queryRunner.query(`UPDATE "alcs"."application_decision_condition_type" SET "is_administrative_fee_amount_checked" = true, "application_decision_condition_type_date_type_enum" = 'Single', "single_date_label" = 'Due Date' WHERE "code" NOT IN ('SRPT', 'UEND')`); + await queryRunner.query(`UPDATE "alcs"."notice_of_intent_decision_condition_type" SET "is_administrative_fee_amount_checked" = true, "application_decision_condition_type_date_type_enum" = 'Single', "single_date_label" = 'Due Date' WHERE "code" NOT IN ('SRPT', 'UEND')`); + } + + public async down(queryRunner: QueryRunner): Promise { + // N/A + } + +} From ee8d850f0f73ba2afdfa66b83d2fef9493c8c7a4 Mon Sep 17 00:00:00 2001 From: Felipe Barreta Date: Mon, 2 Dec 2024 12:50:47 -0800 Subject: [PATCH 2/2] ALCS-2092 Change date type field --- .../migrations/1733163698882-add_date_and_admin_fee.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/apps/alcs/src/providers/typeorm/migrations/1733163698882-add_date_and_admin_fee.ts b/services/apps/alcs/src/providers/typeorm/migrations/1733163698882-add_date_and_admin_fee.ts index 42a6fef538..c295ead2fd 100644 --- a/services/apps/alcs/src/providers/typeorm/migrations/1733163698882-add_date_and_admin_fee.ts +++ b/services/apps/alcs/src/providers/typeorm/migrations/1733163698882-add_date_and_admin_fee.ts @@ -3,8 +3,8 @@ import { MigrationInterface, QueryRunner } from "typeorm"; export class AddDateAndAdminFee1733163698882 implements MigrationInterface { public async up(queryRunner: QueryRunner): Promise { - await queryRunner.query(`UPDATE "alcs"."application_decision_condition_type" SET "is_administrative_fee_amount_checked" = true, "application_decision_condition_type_date_type_enum" = 'Single', "single_date_label" = 'Due Date' WHERE "code" NOT IN ('SRPT', 'UEND')`); - await queryRunner.query(`UPDATE "alcs"."notice_of_intent_decision_condition_type" SET "is_administrative_fee_amount_checked" = true, "application_decision_condition_type_date_type_enum" = 'Single', "single_date_label" = 'Due Date' WHERE "code" NOT IN ('SRPT', 'UEND')`); + await queryRunner.query(`UPDATE "alcs"."application_decision_condition_type" SET "is_administrative_fee_amount_checked" = true, "date_type" = 'Single', "single_date_label" = 'Due Date' WHERE "code" NOT IN ('SRPT', 'UEND')`); + await queryRunner.query(`UPDATE "alcs"."notice_of_intent_decision_condition_type" SET "is_administrative_fee_amount_checked" = true, "date_type" = 'Single', "single_date_label" = 'Due Date' WHERE "code" NOT IN ('SRPT', 'UEND')`); } public async down(queryRunner: QueryRunner): Promise {