Skip to content

Added automated_email_recipients database table#25902

Merged
cmraible merged 4 commits intomainfrom
chris-ny-936-add-automated_email_recipients-database-table
Jan 22, 2026
Merged

Added automated_email_recipients database table#25902
cmraible merged 4 commits intomainfrom
chris-ny-936-add-automated_email_recipients-database-table

Conversation

@cmraible
Copy link
Copy Markdown
Collaborator

@cmraible cmraible commented Jan 20, 2026

ref https://linear.app/ghost/issue/NY-936

Summary

  • Adds automated_email_recipients table to track automated emails sent to members
  • First step in implementing welcome emails in the member activity feed
  • Follows the email_recipients pattern: no FK on member_id to preserve audit history when members are deleted

@github-actions github-actions bot added the migration [pull request] Includes migration for review label Jan 20, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jan 20, 2026

It looks like this PR contains a migration 👀
Here's the checklist for reviewing migrations:

General requirements

  • ⚠️ Tested performance on staging database servers, as performance on local machines is not comparable to a production environment
  • Satisfies idempotency requirement (both up() and down())
  • Does not reference models
  • Filename is in the correct format (and correctly ordered)
  • Targets the next minor version
  • All code paths have appropriate log messages
  • Uses the correct utils
  • Contains a minimal changeset
  • Does not mix DDL/DML operations
  • Tested in MySQL and SQLite

Schema changes

  • Both schema change and related migration have been implemented
  • For index changes: has been performance tested for large tables
  • For new tables/columns: fields use the appropriate predefined field lengths
  • For new tables/columns: field names follow the appropriate conventions
  • Does not drop a non-alpha table outside of a major version

Data changes

  • Mass updates/inserts are batched appropriately
  • Does not loop over large tables/datasets
  • Defends against missing or invalid data
  • For settings updates: follows the appropriate guidelines

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Jan 20, 2026

Walkthrough

This pull request introduces a new database table automated_email_recipients to the system. The changes include a migration file to create the table with a defined schema (id, automated_email_id, member_id, member_uuid, member_email, member_name, created_at, updated_at), schema definitions in the core schema configuration, updates to backup and export table lists to include the new table, and corresponding test updates to reflect the schema changes and expected exported tables.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: adding the automated_email_recipients database table, which is the primary objective of this PR.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description check ✅ Passed The PR description accurately describes the changeset: adding an automated_email_recipients table to track automated emails sent to members.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

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

@cmraible cmraible changed the title Added automated_email_recipients database table Added automated_email_recipients database table Jan 20, 2026
@cmraible cmraible requested a review from troyciesco January 20, 2026 00:53
Copy link
Copy Markdown
Contributor

@troyciesco troyciesco left a comment

Choose a reason for hiding this comment

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

marking as request changes bc i think we want to do the two things i noted but lmk if i'm wrong!

@cmraible cmraible force-pushed the chris-ny-936-add-automated_email_recipients-database-table branch from 69d7c5b to c8baaa0 Compare January 21, 2026 00:30
ref https://linear.app/ghost/issue/NY-936

This table stores records of automated emails sent to members, starting
with welcome emails. The member_id has no foreign key constraint,
following the email_recipients pattern, to preserve audit history when
members are deleted. Denormalized member fields capture point-in-time
data at send time.
Added automated_email_recipients to expected tables list
@cmraible cmraible force-pushed the chris-ny-936-add-automated_email_recipients-database-table branch from c8baaa0 to 4367d1a Compare January 21, 2026 23:37
@cmraible cmraible merged commit 1c266f6 into main Jan 22, 2026
37 checks passed
@cmraible cmraible deleted the chris-ny-936-add-automated_email_recipients-database-table branch January 22, 2026 21:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

migration [pull request] Includes migration for review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants