- extend sync_type union with 'phishing-sweep' - add defaultSchedules entry (disabled by default, daily 5am cron) - dispatch branch dynamically imports and calls sweepPhishingTickets - migrations/098_phishing_sweep_schedule.sql seeds the row for existing installs
25 lines
765 B
SQL
25 lines
765 B
SQL
-- Migration 098: Seed the phishing-sweep sync schedule.
|
|
--
|
|
-- The sync_scheduler.createDefaultSchedules() path only seeds defaults on a
|
|
-- virgin sync_schedules table; this migration covers existing installs.
|
|
-- Idempotent via ON CONFLICT (id) DO NOTHING. Disabled by default
|
|
-- (is_enabled=false) until an admin opts in via /admin.
|
|
|
|
INSERT INTO sync_schedules (
|
|
id,
|
|
name,
|
|
description,
|
|
cron_expression,
|
|
sync_type,
|
|
years_back,
|
|
is_enabled
|
|
) VALUES (
|
|
'phishing-sweep',
|
|
'Phishing Detection Sweep',
|
|
'Reconciles recently-modified tickets through the phishing detector to catch reports missed by the webhook path (bounded to 500 tickets, idempotent on content hash).',
|
|
'0 5 * * *',
|
|
'phishing-sweep',
|
|
NULL,
|
|
false
|
|
)
|
|
ON CONFLICT (id) DO NOTHING;
|