-- 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;