Ghost/core/server/data/migrations
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
..
hooks Updated Settings.populateDefaults() to account for available columns 2020-06-29 13:22:10 +00:00
init Moved core/server/lib/common/logging to core/shared/logging (#11857) 2020-05-28 19:30:23 +01:00
versions Added migrations for email analytics (#12387) 2020-11-25 17:48:24 +00:00
utils.js Refactored column migrations to use helpers (#12360) 2020-11-16 11:55:51 +00:00