-
-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
Added custom excerpt to post revisions #20323
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
github-actions
bot
added
the
migration
[pull request] Includes migration for review
label
Jun 4, 2024
It looks like this PR contains a migration 👀 General requirements
Schema changes
Data changes
|
kevinansfield
force-pushed
the
excerpt-revisions
branch
from
June 4, 2024 12:03
1bb9541
to
a8de8e7
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #20323 +/- ##
==========================================
+ Coverage 73.28% 73.35% +0.06%
==========================================
Files 1264 1267 +3
Lines 74317 74735 +418
Branches 9886 9966 +80
==========================================
+ Hits 54462 54820 +358
- Misses 19056 19108 +52
- Partials 799 807 +8
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
kevinansfield
force-pushed
the
excerpt-revisions
branch
from
June 5, 2024 08:41
a8de8e7
to
3856241
Compare
- added `post_revisions.custom_excerpt` column to schema - added migration to add `post_revisions.custom_excerpt` to existing databases - added migration to populate `post_revisions.custom_excerpt` with the current `post.custom_excerpt` value from the associated record - ensures no data is inadvertently lost when restoring an old version - using current data matches what would have happened previously where custom_excerpt was never overwritten when restoring an old version
- camelCase->snake_case is already handled - `postIdLocal` does not appear to be used anywhere
kevinansfield
force-pushed
the
excerpt-revisions
branch
from
June 5, 2024 08:54
3856241
to
732dd7c
Compare
mike182uk
reviewed
Jun 5, 2024
.../data/migrations/versions/5.84/2024-06-05-08-42-34-populate-post-revisions-custom-excerpt.js
Outdated
Show resolved
Hide resolved
kevinansfield
changed the title
Added custom excerpt (subtitle) to post revisions
Added custom excerpt to post revisions
Jun 5, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
affects:admin
Anything relating to Ghost Admin
migration
[pull request] Includes migration for review
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
closes https://linear.app/tryghost/issue/MOM-170
When the subtitle field is included in the editor it creates a disconnect with post revisions if the underlying custom excerpt data is not included so we'd like to both preview and restore the subtitle when the in-editor subtitle field is enabled.
post_revisions.custom_excerpt
column to schemapost_revisions.custom_excerpt
to existing databasespost_revisions.custom_excerpt
with the currentpost.custom_excerpt
value from the associated recordcustom_excerpt
fieldcustom_excerpt
field