feat(migrations): finalize email_send_log ā drop error column + enable RLS
Merged
SW
4mo ago+14+14+01234567890123456789-0-0-0123456789
What
Finalizes the email_send_log table:
ALTER TABLE public.email_send_log DROP COLUMN IF EXISTS error;
ALTER TABLE public.email_send_log ENABLE ROW LEVEL SECURITY;
Why
- Drop
errorā it slipped into the create migration (#37) but isn't needed for the core observability goal: the empty-email failures we chase succeed withsuccess:true(soerroris always null), real send failures are rare/unobserved, andlogEmailAttemptnever writes it. Trivially re-addable later (nullable, no backfill). - Enable RLS ā Supabase flags tables without it. Enabled with no policies, matching neighboring internal/service-written tables (
error_logs, the playcount store): the api writes via the service role (bypasses RLS);anon/authenticatedhave no access to this internal log.
Leaves the agreed 7 columns: id, created_at, account_id, chat_id, status, resend_id, raw_body.
Part of recoupable/chat#1829.
š¤ Generated with Claude Code