Files
Sauci/apps/supabase/migrations/20260131214924_add_weekly_summary_notification.sql
T
jjbruntonandClaude Opus 4.5 25db338861 feat: add weekly summary notifications
Adds Sunday weekly recap push notifications summarizing couple match
activity. Includes edge function, migration, notification preference
toggle, and mobile notification handling.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 21:56:32 +00:00

17 lines
551 B
SQL

-- Add weekly_summary_enabled to notification_preferences
ALTER TABLE notification_preferences
ADD COLUMN IF NOT EXISTS weekly_summary_enabled BOOLEAN DEFAULT true;
-- Schedule weekly summary notification: Sunday 10:00 UTC
SELECT cron.schedule(
'send-weekly-summary',
'0 10 * * 0',
$$
SELECT net.http_post(
url := 'https://ckjcrkjpmhqhiucifukx.supabase.co/functions/v1/send-weekly-summary',
headers := jsonb_build_object('Content-Type', 'application/json'),
body := '{}'::jsonb
)
$$
);