-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: change trigger statement to disastertype-specific AB#14615
- Loading branch information
1 parent
9193b1c
commit 7adbd12
Showing
4 changed files
with
55 additions
and
11 deletions.
There are no files selected for viewing
24 changes: 24 additions & 0 deletions
24
services/API-service/migration/1658827145833-TriggerStatementByDisasterType.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,24 @@ | ||
import { MigrationInterface, QueryRunner } from 'typeorm'; | ||
|
||
export class TriggerStatementByDisasterType1658827145833 | ||
implements MigrationInterface { | ||
name = 'TriggerStatementByDisasterType1658827145833'; | ||
|
||
public async up(queryRunner: QueryRunner): Promise<void> { | ||
await queryRunner.query( | ||
`ALTER TABLE "IBF-app"."notification_info" DROP COLUMN "triggerStatement"`, | ||
); | ||
await queryRunner.query( | ||
`ALTER TABLE "IBF-app"."notification_info" ADD "triggerStatement" json NOT NULL DEFAULT '{}'`, | ||
); | ||
} | ||
|
||
public async down(queryRunner: QueryRunner): Promise<void> { | ||
await queryRunner.query( | ||
`ALTER TABLE "IBF-app"."notification_info" DROP COLUMN "triggerStatement"`, | ||
); | ||
await queryRunner.query( | ||
`ALTER TABLE "IBF-app"."notification_info" ADD "triggerStatement" character varying NOT NULL`, | ||
); | ||
} | ||
} |
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