Ghost/core/server/data
Rishabh Garg dba2a2970b
Added migration to fix incorrect mrr events (#12837)
closes https://github.com/TryGhost/Team/issues/595

Due to a bug in `mrr_delta` calculation, we ended up reducing the MRR delta by twice the original amount when a subscription goes from active to canceled and storing it in `members_paid_subscription_events` table, which is used to show the MRR chart on Dashboard. The way we identify the incorrect events in the table which got the double negative value is by checking if they match certain criteria - Both `from_plan` and `to_plan` have same value as a subscription changes status while being on same plan.

This migration halves the `mrr_delta` for incorrect events to restore the correct MRR change for the site.
2021-04-06 21:14:54 +05:30
..
db 💡 Enabled foreign key checks on sqlite3 2021-03-02 11:13:19 +01:00
exporter 💥 Reduced default exports content for DB APIs (#12818) 2021-03-25 19:27:49 +13:00
importer Added default value to accent_color setting (#12743) 2021-03-09 16:15:10 +00:00
migrations Added migration to fix incorrect mrr events (#12837) 2021-04-06 21:14:54 +05:30
schema Updated fixture copy 2021-03-11 19:20:30 +00:00
validation Improved settings validation (#12048) 2020-07-15 17:11:27 +02:00