Ghost/core/server/data/migrations/versions
Fabien 'egg' O'Carroll f4cb5c57c6
Updated members_status_events table (#12647)
refs https://github.com/TryGhost/Ghost/issues/12602

* Updated members_status_events table

By replacing the `status` column with a `from_status` and `to_status`
column, we are able to track the changes between multiple statuses
easier, and accumulate the data. e.g. the delta of paid members in a
given time range is the sum of the `to_status` columns set to 'paid'
minus the sum of the `from_status` columns set to 'paid' within that
time range

* Updated MEGA to handle addition of 'comped' status

With the addition of the 'comped' status, we need to ensure that MEGA
will still send emails to the correct recipients. I've opted to use an
"inverse" filter, as that is the intention of the free/paid split in
MEGA - as far as MEGA is concerned, "free" is the opposite of "paid"

* Updated customQuery for MemberStatusEvent

With the `status` column replaced with `from_status` and `to_status`
this allows us to fix and update the customQuery to correctly accumulate
the data into deltas over time, broken down by day.

* Populated members_status_events table

As the table will be used to generate deltas, we need to backfill the
data so that existing sites will be able to sum up the deltas and
calculate correct data.

The assumptions used in backfilling is that a Member's current status,
is their only status.
2021-02-16 10:38:36 +00:00
..
1.3 Refactored 'add column' migrations to use helper 2020-11-25 13:56:10 +00:00
1.4 Refactored 'add column' migrations to use helper 2020-11-25 13:56:10 +00:00
1.5 Refactored 'add column' migrations to use helper 2020-11-25 13:56:10 +00:00
1.7 Removed all clients and client_trusted_domains related code 2019-09-12 15:09:49 +01:00
1.9 Updated ALL permissions migrations to use the utils 2020-06-25 19:15:25 +02:00
1.13 Refactored 'add column' migrations to use helper 2020-11-25 13:56:10 +00:00
1.18 Refactored 'add table' migrations to use helper 2020-11-25 13:56:10 +00:00
1.19 Updated ALL permissions migrations to use the utils 2020-06-25 19:15:25 +02:00
1.20 Moved core/server/lib/common/logging to core/shared/logging (#11857) 2020-05-28 19:30:23 +01:00
1.21 Moved core/server/lib/common/logging to core/shared/logging (#11857) 2020-05-28 19:30:23 +01:00
1.22 Refactored 'add table' migrations to use helper 2020-11-25 13:56:10 +00:00
1.25 Moved core/server/lib/common/logging to core/shared/logging (#11857) 2020-05-28 19:30:23 +01:00
2.0 Moved core/server/lib/common/logging to core/shared/logging (#11857) 2020-05-28 19:30:23 +01:00
2.2 Refactored 'add table' migrations to use helper 2020-11-25 13:56:10 +00:00
2.3 Refactored 'add column' migrations to use helper 2020-11-25 13:56:10 +00:00
2.6 Updated ALL permissions migrations to use the utils 2020-06-25 19:15:25 +02:00
2.8 Refactored 'add table' migrations to use helper 2020-11-25 13:56:10 +00:00
2.13 💡Reverted "empty-string to NULL" db migration (#10430) 2019-01-29 14:41:04 +00:00
2.14 Refactored 'add table' migrations to use helper 2020-11-25 13:56:10 +00:00
2.15 Refactored 'add column' migrations to use helper 2020-11-25 13:56:10 +00:00
2.16 Removed 2.16 member permission migration 2019-05-02 17:31:38 +02:00
2.17 Refactored 'add column' migrations to use helper 2020-11-25 13:56:10 +00:00
2.18 Fixed "no-shadow" linting error in server/data modules (#12288) 2020-10-20 11:56:46 +13:00
2.21 Updated ALL permissions migrations to use the utils 2020-06-25 19:15:25 +02:00
2.22 Updated ALL permissions migrations to use the utils 2020-06-25 19:15:25 +02:00
2.27 Added missing Bluebird requires 2020-11-05 11:55:14 +00:00
2.28 Updated ALL permissions migrations to use the utils 2020-06-25 19:15:25 +02:00
2.29 Refactored column migrations to use helpers (#12360) 2020-11-16 11:55:51 +00:00
2.31 Refactored column migrations to use helpers (#12360) 2020-11-16 11:55:51 +00:00
2.32 Refactored column migrations to use helpers (#12360) 2020-11-16 11:55:51 +00:00
2.33 Moved core/server/lib/common/logging to core/shared/logging (#11857) 2020-05-28 19:30:23 +01:00
2.34 Refactored 'add table' migrations to use helper 2020-11-25 13:56:10 +00:00
2.35 Refactored column migrations to use helpers (#12360) 2020-11-16 11:55:51 +00:00
2.37 Moved core/server/lib/common/logging to core/shared/logging (#11857) 2020-05-28 19:30:23 +01:00
3.0 Refactored 'add table' migrations to use helper 2020-11-25 13:56:10 +00:00
3.1 Refactored 'add table' migrations to use helper 2020-11-25 13:56:10 +00:00
3.2 Refactored column migrations to use helpers (#12360) 2020-11-16 11:55:51 +00:00
3.6 Refactored 'add table' migrations to use helper 2020-11-25 13:56:10 +00:00
3.7 Moved core/server/lib/common/logging to core/shared/logging (#11857) 2020-05-28 19:30:23 +01:00
3.8 Refactored column migrations to use helpers (#12360) 2020-11-16 11:55:51 +00:00
3.9 Updated ALL permissions migrations to use the utils 2020-06-25 19:15:25 +02:00
3.11 Moved core/server/lib/common/logging to core/shared/logging (#11857) 2020-05-28 19:30:23 +01:00
3.12 Updated ALL permissions migrations to use the utils 2020-06-25 19:15:25 +02:00
3.18 Updated ALL permissions migrations to use the utils 2020-06-25 19:15:25 +02:00
3.19 Added migration updating members from address with domain 2020-06-08 23:47:02 +05:30
3.22 Refactored column migrations to use helpers (#12360) 2020-11-16 11:55:51 +00:00
3.23 Refactored column migrations to use helpers (#12360) 2020-11-16 11:55:51 +00:00
3.24 Added missing Bluebird requires 2020-11-05 11:55:14 +00:00
3.25 Fixed version for amp_gtag_id setting migration 2020-07-15 15:33:37 +02:00
3.26 Fixed version for amp_gtag_id setting migration 2020-07-15 15:33:37 +02:00
3.29 🐛 Fixed failing migration from <2.34 to 3.29 2020-08-17 18:31:00 +01:00
3.30 Granted Admin users ability to impersonate member (#12132) 2020-08-18 14:17:56 +05:30
3.32 Added routes_hash setting (#12171) 2020-09-07 21:54:55 +12:00
3.33 Refactored 'add table' migrations to use helper 2020-11-25 13:56:10 +00:00
3.34 Added tokens table to the database 2020-09-17 16:08:35 +01:00
3.35 Refactored column migrations to use helpers (#12360) 2020-11-16 11:55:51 +00:00
3.36 Added snippets permissions migration and fixtures (#12283) 2020-10-16 12:53:09 +01:00
3.37 Enabled Portal (#12317) 2020-11-03 14:36:21 +05:30
3.38 🐛 Fixed migration for SQLite3 (#12371) 2020-11-17 16:39:42 +00:00
3.39 Added migrations for email analytics (#12387) 2020-11-25 17:48:24 +00:00
3.40 Added members.email_{count,opened_count} column migrations (#12470) 2020-12-09 12:21:56 +00:00
3.41 Added FirstPromoter Integration (#12540) 2021-01-15 19:05:15 +05:30
4.0 Updated members_status_events table (#12647) 2021-02-16 10:38:36 +00:00