Skip to content

feat(migrations): finalize email_send_log — drop error column + enable RLS#38

Merged
sweetmantech merged 1 commit into
mainfrom
chore/email-send-log-drop-error
Jun 30, 2026
Merged

feat(migrations): finalize email_send_log — drop error column + enable RLS#38
sweetmantech merged 1 commit into
mainfrom
chore/email-send-log-drop-error

Conversation

@sweetmantech

@sweetmantech sweetmantech commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

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 (feat(migrations): create email_send_log table #37) but isn't needed for the core observability goal: the empty-email failures we chase succeed with success:true (so error is always null), real send failures are rare/unobserved, and logEmailAttempt never 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/authenticated have 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

@coderabbitai

coderabbitai Bot commented Jun 30, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@sweetmantech, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 34 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: ddd155f8-5605-4f61-9b7c-6c778556e21d

📥 Commits

Reviewing files that changed from the base of the PR and between 1b0a059 and 7300ea3.

📒 Files selected for processing (1)
  • supabase/migrations/20260630211500_finalize_email_send_log.sql
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/email-send-log-drop-error

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@supabase

supabase Bot commented Jun 30, 2026

Copy link
Copy Markdown

Updates to Preview Branch (chore/email-send-log-drop-error) ↗︎

Deployments Status Updated
Database Tue, 30 Jun 2026 21:32:36 UTC
Services Tue, 30 Jun 2026 21:32:36 UTC
APIs Tue, 30 Jun 2026 21:32:36 UTC

Tasks are run on every commit but only new migration files are pushed.
Close and reopen this PR if you want to apply changes from existing seed or migration files.

Tasks Status Updated
Configurations Tue, 30 Jun 2026 21:32:36 UTC
Migrations Tue, 30 Jun 2026 21:32:36 UTC
Seeding Tue, 30 Jun 2026 21:32:36 UTC
Edge Functions Tue, 30 Jun 2026 21:32:36 UTC

View logs for this Workflow Run ↗︎.
Learn more about Supabase for Git ↗︎.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

Re-trigger cubic

…e RLS

Drops the unused `error` column (Resend send-failure reason; the empty-email
failures succeed so it's always null, and the api never writes it) and enables
RLS with no policies, matching neighboring internal/service-written tables
(error_logs, playcount store) — the api writes via the service role, which
bypasses RLS; anon/authenticated have no access to this internal log.

Ref: recoupable/chat#1829

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@sweetmantech sweetmantech force-pushed the chore/email-send-log-drop-error branch from 7717170 to 7300ea3 Compare June 30, 2026 21:32
@sweetmantech sweetmantech changed the title feat(migrations): drop unused error column from email_send_log feat(migrations): finalize email_send_log — drop error column + enable RLS Jun 30, 2026
@sweetmantech sweetmantech merged commit bdffa77 into main Jun 30, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant