Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[4.x] Fixed newsletter header image path #14690

Merged

Conversation

SimonBackx
Copy link
Contributor

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

  • When writing to the database, the header_image is tranformed to the transformReady path
  • When reading from the database, the transformReady path is transformed to an absolute path
  • Includes a test when adding a newsletter

Migration:

  • Updates all newsletter who have a header_image to make sure it is saved in transform ready format
  • Down operation is required to work with the old model logic and transforms it back to an absolute format

5.x version: #14688

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

- When writing to the database, the header_image is tranformed to the transformReady path
- When reading from the database, the transformReady path is transformed to an absolute path
- Includes a test when adding a newsletter
refs https://github.com/TryGhost/Team/issues/1579

- Updates all newsletter who have a header_image to make sure it is saved in transform ready format
- Down operation is required to work with the old model logic and transforms it back to an absolute format
@github-actions
Copy link
Contributor

github-actions bot commented May 4, 2022

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

General requirements

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

Data changes

  • Mass updates/inserts are batched appropriately (small table)
  • Does not loop over large tables/datasets (small table)
  • Defends against missing or invalid data (whereNotNull)
  • For settings updates: follows the appropriate guidelines

@codecov
Copy link

codecov bot commented May 4, 2022

Codecov Report

Merging #14690 (f0eb300) into 4.x (1dc61ca) will decrease coverage by 0.02%.
The diff coverage is 13.04%.

@@            Coverage Diff             @@
##              4.x   #14690      +/-   ##
==========================================
- Coverage   59.85%   59.83%   -0.03%     
==========================================
  Files         580      580              
  Lines       47993    48016      +23     
  Branches     4217     4217              
==========================================
+ Hits        28727    28730       +3     
- Misses      19225    19245      +20     
  Partials       41       41              
Impacted Files Coverage Δ
core/server/models/newsletter.js 31.41% <13.04%> (-3.18%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1dc61ca...f0eb300. Read the comment docs.

@SimonBackx SimonBackx merged commit 739b06d into TryGhost:4.x May 4, 2022
matthanley pushed a commit to matthanley/Ghost that referenced this pull request May 4, 2022
refs https://github.com/TryGhost/Team/issues/1579

- When writing to the database, the header_image is tranformed to the transformReady path
- When reading from the database, the transformReady path is transformed to an absolute path
- Includes a test when adding a newsletter

Migration:
- Updates all newsletter who have a header_image to make sure it is saved in transform ready format
- Down operation is required to work with the old model logic and transforms it back to an absolute format
matthanley pushed a commit that referenced this pull request May 5, 2022
refs https://github.com/TryGhost/Team/issues/1579

- When writing to the database, the header_image is tranformed to the transformReady path
- When reading from the database, the transformReady path is transformed to an absolute path
- Includes a test when adding a newsletter

Migration:
- Updates all newsletter who have a header_image to make sure it is saved in transform ready format
- Down operation is required to work with the old model logic and transforms it back to an absolute format
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants