-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
assessment creation email to agency validators and counsellors for im…
…mersion kind only
- Loading branch information
Showing
13 changed files
with
768 additions
and
345 deletions.
There are no files selected for viewing
30 changes: 30 additions & 0 deletions
30
back/src/config/pg/migrations/1736937109801_rename-assessment-notification-kinds.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,30 @@ | ||
/* eslint-disable @typescript-eslint/naming-convention */ | ||
import { ColumnDefinitions, MigrationBuilder } from "node-pg-migrate"; | ||
|
||
export const shorthands: ColumnDefinitions | undefined = undefined; | ||
|
||
export async function up(pgm: MigrationBuilder): Promise<void> { | ||
pgm.sql(` | ||
UPDATE notifications_email | ||
SET email_kind = 'ASSESSMENT_BENEFICIARY_NOTIFICATION' | ||
WHERE email_kind = 'BENEFICIARY_ASSESSMENT_NOTIFICATION' | ||
`); | ||
pgm.sql(` | ||
UPDATE notifications_email | ||
SET email_kind = 'ASSESSMENT_ESTABLISHMENT_NOTIFICATION' | ||
WHERE email_kind = 'ESTABLISHMENT_ASSESSMENT_NOTIFICATION' | ||
`); | ||
} | ||
|
||
export async function down(pgm: MigrationBuilder): Promise<void> { | ||
pgm.sql(` | ||
UPDATE notifications_email | ||
SET email_kind = 'BENEFICIARY_ASSESSMENT_NOTIFICATION' | ||
WHERE email_kind = 'ASSESSMENT_BENEFICIARY_NOTIFICATION' | ||
`); | ||
pgm.sql(` | ||
UPDATE notifications_email | ||
SET email_kind = 'ESTABLISHMENT_ASSESSMENT_NOTIFICATION' | ||
WHERE email_kind = 'ASSESSMENT_ESTABLISHMENT_NOTIFICATION' | ||
`); | ||
} |
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
Oops, something went wrong.