-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2015 from bcgov/feature/ACLS-2312-QA-2
Fix not nullable date field not allowing to save empty date
- Loading branch information
Showing
7 changed files
with
26 additions
and
10 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
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
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
...alcs/src/providers/typeorm/migrations/1734030229522-make_condition_date_dates_nullable.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"; | ||
|
||
export class MakeConditionDateDatesNullable1734030229522 implements MigrationInterface { | ||
name = 'MakeConditionDateDatesNullable1734030229522' | ||
|
||
public async up(queryRunner: QueryRunner): Promise<void> { | ||
await queryRunner.query(`ALTER TABLE "alcs"."application_decision_condition_date" ALTER COLUMN "date" DROP NOT NULL`); | ||
await queryRunner.query(`ALTER TABLE "alcs"."notice_of_intent_decision_condition_date" ALTER COLUMN "date" DROP NOT NULL`); | ||
} | ||
|
||
public async down(queryRunner: QueryRunner): Promise<void> { | ||
await queryRunner.query(`ALTER TABLE "alcs"."notice_of_intent_decision_condition_date" ALTER COLUMN "date" SET NOT NULL`); | ||
await queryRunner.query(`ALTER TABLE "alcs"."application_decision_condition_date" ALTER COLUMN "date" SET NOT NULL`); | ||
} | ||
|
||
} |