Ghost/core/server
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
..
adapters Moved core/server/lib/common/logging to core/shared/logging (#11857) 2020-05-28 19:30:23 +01:00
api Fixed integration_id assignment for webhook when creating through API key auth 2020-08-04 16:43:24 +12:00
data Cleaned up members_stripe_* tables on MySQL (#12103) 2020-08-06 11:13:41 +02:00
lib 🐛 Fixed srcset and sizes attributes being rendered when image resizing unavailable 2020-07-02 18:03:22 +01:00
models Reduced error level to default for not found post error 2020-08-03 23:16:53 +12:00
public Renamed members ssr + api endpoints 2020-04-30 19:00:37 +01:00
services Fixed bookmark card image size in fastmail (#11970) 2020-08-03 18:38:45 +01:00
translations Added JSON Schema validations to Webhooks Admin API v3 2020-07-17 17:37:14 +12:00
views Updated head to only output custom favicons (#11949) 2020-06-30 15:07:08 +01:00
web Updated stability index comments around Admin API v2 endpoints 2020-08-03 23:46:23 +12:00
analytics-events.js Moved config from server to shared (#11850) 2020-05-27 18:47:53 +01:00
ghost-server.js Moved core/server/lib/common/logging to core/shared/logging (#11857) 2020-05-28 19:30:23 +01:00
index.js 🐛 Fixed settings cache being out of sync after migrations (#11987) 2020-07-01 17:16:57 +01:00
overrides.js Disabled bluebird debug logs 2018-08-13 14:01:31 +02:00
update-check.js Moved core/server/lib/common/logging to core/shared/logging (#11857) 2020-05-28 19:30:23 +01:00