Ghost/core/server/data/migrations/versions/3.39
Kevin Ansfield 0c59b948fa
Added migrations for email analytics (#12387)
no issue

- cleans up unused tables `emails.{meta,stats}`
- adds timestamp columns `email_recipients.{delivered_at,opened_at,failed_at}` that can be used for event timelines and basic stats aggregation
  - indexed because we want to sort by these columns to find the "latest event" when limiting Mailgun events API requests
- adds aggregated stats columns `emails.{delivered_count,opened_count,failed_count}`
- adds a composite index on `email_recipients.[email_id,member_email]` to dramatically speed up `email_recipient` update queries when processing events
  - modifies the db initialisation to support an `'@@INDEXES@@'` key in table schema definition for composite indexes
2020-11-25 17:48:24 +00:00
..
01-add-members-signup-redirect-settings.js Added new settings for members signup redirects (#12370) 2020-11-17 17:17:54 +00:00
02-add-user-id-to-api-keys-table.js Fixed Personal Tokens migration file name 2020-11-20 10:35:31 +01:00
03-add-email-track-opens-setting.js Added "email_track_opens" setting (#12404) 2020-11-23 18:36:12 +00:00
04-add-cancellation-reason-column.js Added cancellation_reason column to stripe subscriptions (#12405) 2020-11-23 15:36:14 +00:00
05-remove-unused-columns-on-emails.js Added migrations for email analytics (#12387) 2020-11-25 17:48:24 +00:00
06-add-email-recipient-index.js Added migrations for email analytics (#12387) 2020-11-25 17:48:24 +00:00
07-add-email-recipients-event-timestamps.js Added migrations for email analytics (#12387) 2020-11-25 17:48:24 +00:00
08-add-email-stats-columns.js Added migrations for email analytics (#12387) 2020-11-25 17:48:24 +00:00