Ghost/core/server/data/schema
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
..
clients Fixed "no-shadow" linting error in server/data modules (#12288) 2020-10-20 11:56:46 +13:00
fixtures Updated links to ghost.org sites 2021-01-20 09:59:45 +13:00
checks.js Update Test & linting packages (major) (#10858) 2019-07-05 13:40:43 +02:00
commands.js Refactored createTable migration utility 2021-02-04 13:37:20 +13:00
default-settings.json 🏗 Updated "slack" setting into "slack_{url,username}" 2021-02-15 15:25:54 +13:00
index.js 🔥 remove database version (#7894) 2017-01-26 12:12:00 +00:00
schema.js Updated members_status_events table (#12647) 2021-02-16 10:38:36 +00:00