-- Migration: Drop notifications trigger that posts to the send_fcm edge function
-- Reason: moving push invocation to client-side; remove server trigger to avoid duplicate sends
BEGIN;

-- Remove the trigger that calls the edge function on insert into public.notifications
DROP TRIGGER IF EXISTS notifications_send_fcm_trigger ON public.notifications;

-- Remove the trigger function as well (if present)
DROP FUNCTION IF EXISTS notifications_send_fcm_trigger() CASCADE;

COMMIT;

-- NOTE: After deploying this migration, the application will rely on the
-- client-side push path. Ensure client builds are released and rollout is
-- coordinated before applying this migration in production to avoid missing
-- pushes for any clients that still expect server-side delivery.
