2026-02-23 16:12:33 +01:00
|
|
|
-- Insert missing notification email settings into production DB
|
2026-02-23 16:08:46 +01:00
|
|
|
-- Run manually: psql -d mopc -f prisma/migrations/insert-dropout-reassigned-setting.sql
|
|
|
|
|
-- Safe to run multiple times (uses ON CONFLICT to skip if already exists)
|
|
|
|
|
|
|
|
|
|
INSERT INTO "NotificationEmailSetting" (
|
|
|
|
|
"id", "notificationType", "category", "label", "description", "sendEmail", "createdAt", "updatedAt"
|
2026-02-23 16:12:33 +01:00
|
|
|
) VALUES
|
|
|
|
|
(
|
|
|
|
|
gen_random_uuid()::text,
|
|
|
|
|
'COI_REASSIGNED',
|
|
|
|
|
'jury',
|
|
|
|
|
'COI Reassignment',
|
|
|
|
|
'When a project is reassigned to you due to another juror''s conflict of interest',
|
|
|
|
|
true,
|
|
|
|
|
NOW(),
|
|
|
|
|
NOW()
|
|
|
|
|
),
|
|
|
|
|
(
|
|
|
|
|
gen_random_uuid()::text,
|
|
|
|
|
'MANUAL_REASSIGNED',
|
|
|
|
|
'jury',
|
|
|
|
|
'Manual Reassignment',
|
|
|
|
|
'When an admin manually reassigns a project to you',
|
|
|
|
|
true,
|
|
|
|
|
NOW(),
|
|
|
|
|
NOW()
|
|
|
|
|
),
|
|
|
|
|
(
|
2026-02-23 16:08:46 +01:00
|
|
|
gen_random_uuid()::text,
|
|
|
|
|
'DROPOUT_REASSIGNED',
|
|
|
|
|
'jury',
|
|
|
|
|
'Juror Dropout Reassignment',
|
|
|
|
|
'When projects are reassigned to you because a juror dropped out or became unavailable',
|
|
|
|
|
true,
|
|
|
|
|
NOW(),
|
|
|
|
|
NOW()
|
2026-02-23 16:12:33 +01:00
|
|
|
)
|
|
|
|
|
ON CONFLICT ("notificationType") DO NOTHING;
|