-
-
Notifications
You must be signed in to change notification settings - Fork 317
feat: Move page metadata to PageVersion #3554
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
Conversation
mamhoff
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few comments here. Otherwise moving metadata to versions is great!
067b570 to
7489441
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3554 +/- ##
==========================================
+ Coverage 97.25% 97.26% +0.01%
==========================================
Files 291 291
Lines 7682 7721 +39
==========================================
+ Hits 7471 7510 +39
Misses 211 211 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
797a5e0 to
8a58ac5
Compare
Replace the top-level Upgrader constant with Alchemy::Upgrader[version] class method (similar to ActiveRecord::Migration[version]). This avoids constant redefinition warnings when the rake file is loaded multiple times, while still ensuring todos are accumulated across rake tasks via memoization.
Add title, meta_description, and meta_keywords to alchemy_page_versions table. This prepares for versioned page metadata where each version (draft/public) maintains its own content metadata.
Page metadata (title, meta_description, meta_keywords) is now stored on PageVersion, enabling different content for draft and published versions. The Page model delegates these attributes to public_version for backward compatibility. Admin forms write to draft_version, and publishing copies metadata from draft to the new public version.
Provides a rake task to copy existing page metadata (title, meta_description, meta_keywords) to all page versions during upgrade.
In other tests we add todos and this is a cached singleton attribute.
8a58ac5 to
7e01082
Compare
What is this pull request for?
Page metadata (
title,meta_description,meta_keywords) is now stored onPageVersion, enabling different content for draft and published versions.The Page model delegates these attributes to
public_versionfor backwardcompatibility. Admin forms write to
draft_version, and publishing copiesmetadata from draft to the new public version.
Provides a rake task to copy existing page metadata to all page versions during upgrade.
Notable changes
Deprecates setting
title=,meta_description=andmeta_keywords=on page.Checklist