0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-03-11 02:12:21 -05:00
ghost/core/server/data
Simon Backx 9def4e6edc
Added migration to backfill offer ids in subscriptions (#14511)
refs https://github.com/TryGhost/Team/issues/1520

- Sets the `offer_id` in the `members_stripe_customers_subscriptions` table based on the `offer_redemptions` that have the same tier and cadence
- We currently use the same subscription <-> offer linking when viewing a member
- The MySQL query is quite optimized in a single UPDATE query, but in SQLite we'll need to run (maximum) one UPDATE query for every offer (not per subscription).
- Best to merge this migration in 4.x (not in 5.0) because it is better (less error prone) to run this migration before starting to fill the offer_id field for updated migrations instead of after (https://github.com/TryGhost/Ghost/pull/14488)
- We need the SQLite migration for sites that will only migrate to MySQL at 5.0
2022-04-21 11:45:24 +02:00
..
db
exporter Added table to store multiple newsletters for member (#14408) 2022-04-04 18:11:36 +05:30
importer Replaced white/black list terminology 2022-04-19 11:19:59 +01:00
migrations Added migration to backfill offer ids in subscriptions (#14511) 2022-04-21 11:45:24 +02:00
schema Added newsletter read permission (#14519) 2022-04-20 15:25:41 +02:00