Ghost/core/server/data/migrations
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
..
hooks Updated Settings.populateDefaults() to account for available columns 2020-06-29 13:22:10 +00:00
init Moved core/server/lib/common/logging to core/shared/logging (#11857) 2020-05-28 19:30:23 +01:00
versions Added migration to create indexes and constraints for member tables (#12108) 2020-08-06 14:57:05 +02:00
utils.js Added migration utils for permissions 2020-06-25 19:15:25 +02:00