Ghost/core/server/data/schema
Rishabh Garg eeafc8603b
Added pivot table to store tiers on post (#14038)
refs https://github.com/TryGhost/Team/issues/1071

We used `posts.visibility` originally to store visibility as `free|paid` with a character limit of 50. This same field was repurposed to store an NQL filter when member tiers is enabled. The NQL filter uses the slug of the tier name, which can easily create a filter longer than 50 characters, adding an unwanted limitation on number of tiers that can be added to post's visibility.
Going forward, we'd like to store the visibility of posts for tiers in a separate pivot table and instead store the value of `visibility` as `tiers` when restricting post access to specific tiers. This change -

- adds a new pivot table fixture for storing relation between posts and tiers
- adds a migration for creating the new table
- updates tests
2022-01-31 15:33:58 +05:30
..
clients Fixed "no-shadow" linting error in server/data modules (#12288) 2020-10-20 11:56:46 +13:00
fixtures Added active column to products table (#14016) 2022-01-20 15:50:18 +02:00
checks.js Update Test & linting packages (major) (#10858) 2019-07-05 13:40:43 +02:00
commands.js Switch to @tryghost/errors from ignition errors package (#13807) 2021-12-01 10:22:01 +00:00
default-settings.json Switched AMP to be 'off' by default in all new Ghost instances (#13907) 2022-01-14 18:55:48 +02:00
index.js Moved schema validator into the schema module 2021-06-15 11:54:34 +01:00
schema.js Added pivot table to store tiers on post (#14038) 2022-01-31 15:33:58 +05:30
validator.js Switch to @trghost/validator, remove validator 2021-06-16 08:11:22 +01:00