0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-03 23:00:14 -05:00
ghost/core/server/data
Kevin Ansfield 490f9787fa
Added migration to create indexes and constraints for member tables (#12108)
no issue

For large numbers of members we're unable to perform queries for free/paid members in a reasonable time without indexes. Bulk delete is also very slow when looping through bookshelf models and having bookshelf manage deletion of child records, adding `ON DELETE CASCADE` to the foreign key indexes moves child deletion to the DB level and allows for performant bulk delete queries.

- migrations only run on mysql because sqlite does not support altering tables
- adds foreign key indexes and constraints with 'ON DELETE CASCADE' for members_labels, members_stripe_customers, and members_stripe_customers_subscriptions
2020-08-06 14:57:05 +02:00
..
db Moved core/server/lib/common/logging to core/shared/logging (#11857) 2020-05-28 19:30:23 +01:00
exporter Removed use of deprecated setting flags from the codebase 2020-06-23 11:58:19 +12:00
importer Remove references to bulk email settings (#12000) 2020-07-03 16:30:54 +02:00
migrations Added migration to create indexes and constraints for member tables (#12108) 2020-08-06 14:57:05 +02:00
schema Added support for ON DELETE CASCADE to the schema (#12105) 2020-08-05 13:20:30 +02:00
validation Improved settings validation (#12048) 2020-07-15 17:11:27 +02:00