Ghost/test/unit/server
Thibaut Patel 2bfd8f8b7e
Added the post-newsletter relation (#14411)
refs https://github.com/TryGhost/Team/issues/1471

- This is a many-to-one relation so that many posts can be linked to a specific newsletter
- The `newsletters` table had to come first in the schema file so that it's initialized before the `posts` table (because of the foreign key)
- Updated the model to make sure the new field doesn't leak in the API for now
- This migration isn't using the `createAddColumnMigration` util because of a performance issue. In MySQL, adding/dropping a column without `algorithm=copy` uses the INPLACE algorithm which was too slow on big posts tables (~3 minutes for 10k posts). Switching to the COPY algorithm fixed the issue (~3 seconds for 10k posts).
- SQLite isn't using the codepath where we run a raw SQL query because `knex` is doing multiple queries to add/remove a column
2022-04-07 10:26:37 +02:00
..
adapters Added ability to delete existing files through storage adapters 2021-11-09 16:07:23 +04:00
data Added the post-newsletter relation (#14411) 2022-04-07 10:26:37 +02:00
lib Removed unnecessary use of rewire 2022-03-24 19:32:06 +00:00
models Updated SingleUseToken grace period to 10 minutes (#13926) 2022-01-03 17:55:53 +02:00
services Added default newsletter subscription for new members (#14431) 2022-04-07 08:30:00 +05:30
web 🐛 Fixed theme activation with capitalized names 2022-03-09 20:07:04 +13:00
notify.test.js Fixed notify library tests 2021-12-06 08:20:39 +00:00
overrides.test.js Set global Luxon timezone override to UTC 2021-10-20 09:19:29 +02:00