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

Noop'ed the post_revisions.custom_excerpt population migration #20347

Conversation

kevinansfield
Copy link
Member

no issue

  • the query can take a very long time to run on large sites causing problems during the upgrade process
  • impact from not populating the column:
    • only has an effect when the inline excerpt beta is enabled
    • when beta enabled, if a revision created before the upgrade is restored then the excerpt will be removed (will be visibly empty in preview before restoring, if any edit has occurred on the post after upgrading then it can still be recovered by restoring the later version or copy/pasting from the preview)

no issue

- the query can take a very long time to run on large sites causing problems during the upgrade process
- impact from not populating the column:
  - only has an effect when the inline excerpt beta is enabled
  - when beta enabled, if a revision created before the upgrade is restored then the excerpt will be removed (will be visibly empty in preview before restoring, if any edit has occurred on the post after upgrading then it can still be recovered by restoring the later version or copy/pasting from the preview)
@github-actions github-actions bot added the migration [pull request] Includes migration for review label Jun 6, 2024
Copy link
Contributor

github-actions bot commented Jun 6, 2024

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 (and correctly ordered)
  • 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

Schema changes

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

Data changes

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

no issue

- following on from the removal of the `post_revisions.custom_excerpt` column population it was possible in some circumstances to lose your excerpt when restoring an old version
- this change means when no custom_excerpt exists on a revision we both preview and restore the current custom_excerpt to avoid any data loss
@github-actions github-actions bot added the affects:admin Anything relating to Ghost Admin label Jun 6, 2024
@kevinansfield kevinansfield marked this pull request as ready for review June 6, 2024 16:16
@kevinansfield kevinansfield enabled auto-merge (rebase) June 6, 2024 16:24
@kevinansfield kevinansfield merged commit 202fd7e into TryGhost:main Jun 6, 2024
22 checks passed
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant