Ghost icon indicating copy to clipboard operation
Ghost copied to clipboard

Added Tier price and currency data to products table

Open allouis opened this issue 3 years ago • 3 comments

refs https://github.com/TryGhost/Team/issues/1765

In order to better handle deleted objects in Stripe we want to decouple Members from Stripe.

These changes allow us to have the Tier concept completely independent of the Stripe tables, such that the Stripe data can be generated as/when it's needed - which will help to protect against missing data.

allouis avatar Sep 05 '22 15:09 allouis

It looks like this PR contains a migration 👀 Here's the checklist for reviewing migrations:

General requirements

  • [x] Satisfies idempotency requirement (both up() and down())
  • [x] Does not reference models
  • [x] Filename is in the correct format
  • [x] Targets the next minor version
  • [x] All code paths have appropriate log messages
  • [x] Uses the correct utils
  • [x] Contains a minimal changeset
  • [x] Does not mix DDL/DML operations

Schema changes

  • [x] Both schema change and related migration have been implemented
  • [ ] ~For index changes: has been performance tested for large tables~
  • [x] For new tables/columns: fields use the appropriate predefined field lengths
  • [x] For new tables/columns: field names follow the appropriate conventions
  • [x] Does not drop a non-alpha table outside of a major version

Data changes

  • [ ] Mass updates/inserts are batched appropriately
  • [x] Does not loop over large tables/datasets
  • [x] Defends against missing or invalid data
  • [ ] ~For settings updates: follows the appropriate guidelines~ 

github-actions[bot] avatar Sep 05 '22 15:09 github-actions[bot]

Codecov Report

Base: 52.32% // Head: 52.32% // Increases project coverage by +0.00% :tada:

Coverage data is based on head (5e5f847) compared to base (5c36167). Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #15366   +/-   ##
=======================================
  Coverage   52.32%   52.32%           
=======================================
  Files        1445     1445           
  Lines       93595    93607   +12     
  Branches    10437    10437           
=======================================
+ Hits        48974    48982    +8     
- Misses      43391    43396    +5     
+ Partials     1230     1229    -1     
Impacted Files Coverage Δ
ghost/core/core/server/data/schema/schema.js 100.00% <100.00%> (ø)
ghost/admin/app/helpers/gh-price-amount.js 44.44% <0.00%> (-22.23%) :arrow_down:
ghost/admin/app/components/gh-site-iframe.js 43.18% <0.00%> (-2.28%) :arrow_down:
ghost/admin/app/controllers/offer.js 41.57% <0.00%> (-0.53%) :arrow_down:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

codecov[bot] avatar Sep 05 '22 15:09 codecov[bot]

This is on hold until I get a chance to pick it back up in the next cooldown

allouis avatar Sep 20 '22 19:09 allouis