-- Insert missing notification email settings into production DB
-- 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"
) 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()
),
(
  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()
)
ON CONFLICT ("notificationType") DO NOTHING;
