Ghost/core
Fabien 'egg' O'Carroll d3384975da
Cleaned up members_stripe_* tables on MySQL (#12103)
refs #12100

For performance reasons we want to add foreign key and unique constraints
to the members_stripe_* tables so we can utilised cascading deletes and 
joins across the tables when querying.

In order to do this we must first ensure that:
- There are no duplicate entries in the `subscription_id` or `customer_id` columns
- There are no orphaned rows in the subscription or customers tables

If the first is not true, the unique constraint will fail, and if the second is not true,
the foreign key constraint will fail.

As we are only adding the indexes to existing MySQL databases at this point, the
cleanup migrations will also only be done for existing MySQL databases too.

The migrations for removing orphaned rows splits the deletion into a `SELECT`
followed by a `WHERE IN` to avoid the database "optimising" the query into a
`JOIN` which ends up taking much longer due to the lack of indexes.
2020-08-06 11:13:41 +02:00
..
client@4915f6aee2 Updated Ghost-Admin to v3.28.0 2020-08-04 11:23:40 +01:00
frontend 🐛 Fixed incorrect member gating on custom static page routes 2020-08-03 17:28:55 +05:30
server Cleaned up members_stripe_* tables on MySQL (#12103) 2020-08-06 11:13:41 +02:00
shared Switched on Stripe Connect by default 2020-06-30 14:07:33 +02:00
index.js Refactor common pattern in service files 2020-04-30 20:48:42 +01:00