0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-06 22:40:14 -05:00
ghost/test/unit/data
Kevin Ansfield 76c1b60a4d
Added schema+migration for email_{batches,recipients} tables (#12192)
no issue

We want to store a list of recipients for each bulk email so that we have a consistent set of data that background processing/sending jobs can work from without worrying about moving large data sets around or member data changing mid-send.

- `email_batches` table acts as a join table with status for email<->email_recipient
  - stores a provider-specific ID that we get back when submitting a batch for sending to the bulk email provider
  - `status` allows for batch-specific status updates and picking up where we left off when submitting batches if needed
  - explicitly tying a list of email recipients to a batch allows for partial retries
- `email_recipients` table acts as a join table for email<->member
  - `member_id` does not have a foreign key constraint because members can be deleted but does have an index so that we can efficiently query which emails a member has received
  - stores static copies of the member info present at the time of sending an email for consistency in background jobs and auditing/historical data
2020-09-14 12:21:58 +01:00
..
db Updated var declarations to const/let and no lists 2020-04-29 16:51:13 +01:00
exporter Removed use of deprecated setting flags from the codebase 2020-06-23 11:58:19 +12:00
importer Cleaned up members & stripe settings (#11957) 2020-06-29 16:22:42 +02:00
meta Moved core/server/lib/url-utils to core/shared/url-utils (#11856) 2020-05-28 11:57:02 +01:00
migrations Added migration utils for permissions 2020-06-25 19:15:25 +02:00
schema Added schema+migration for email_{batches,recipients} tables (#12192) 2020-09-14 12:21:58 +01:00
validation Improved settings validation (#12048) 2020-07-15 17:11:27 +02:00
xml/sitemap Removed final non-destructured imports of core/server/lib/common (#11858) 2020-05-28 17:54:18 +01:00