Added nullable posts.auto_excerpt and posts.reading_time columns - #30587
Conversation
|
It looks like this PR contains a migration 👀 General requirements
Schema changes
Data changes
|
|
| Command | Status | Duration | Result |
|---|---|---|---|
nx run ghost:test:ci:integration |
✅ Succeeded | 4m 33s | View ↗ |
nx run ghost:test:integration |
✅ Succeeded | 3m 27s | View ↗ |
nx run ghost:test:ci:e2e |
✅ Succeeded | 4m 7s | View ↗ |
nx run ghost:test:legacy |
✅ Succeeded | 3m 12s | View ↗ |
nx run ghost:test:e2e |
✅ Succeeded | 2m 52s | View ↗ |
nx run ghost-monorepo:lint:boundaries |
✅ Succeeded | 27s | View ↗ |
nx run-many -t lint -p ghost,ghost-monorepo |
✅ Succeeded | 21s | View ↗ |
nx run-many -t test:unit -p ghost |
✅ Succeeded | 33s | View ↗ |
Additional runs (4) |
✅ Succeeded | ... | View ↗ |
💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗
☁️ Nx Cloud last updated this comment at 2026-09-14 14:22:40 UTC
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: QUIET Plan: Advanced Run ID: 📒 Files selected for processing (3)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📜 Recent review details🧰 Additional context used📓 Path-based instructions (4)Review migration safety beyond lint: schema and migration parity, existing-data shape and volume, deploy/rollback compatibility, transaction and locking risk, idempotency, export/integrity updates, and preservation of constraints/defaults.⚙️ CodeRabbit configuration file Files:
New source files must be TypeScript: flag new JS files as a required change unless exempt (DB migrations, apps/ember-admin/, tool/config files, scripts/, docker/, generated code).⚙️ CodeRabbit configuration file Files:
Prioritise concrete correctness, security, data-integrity, compatibility, and regression risks.⚙️ CodeRabbit configuration file Files:
New files are TypeScript: Fail if the PR adds a new .js/.jsx/.cjs/.mjs source file, unless it is: a DB migration (ghost/core/core/server/data/migrations/), under apps/ember-admin/, a tool/config file, under scripts/ or docker/, or generated...📄 CodeRabbit inference engine (Custom checks) Files:
🔇 Additional comments (3)
WalkthroughThe posts schema adds nullable Suggested reviewers: Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to This change adds nullable post metadata columns while keeping internal values out of public responses, webhooks, and member event attribution. The migration and serialization behavior are aligned, with no remaining concrete merge-blocking risk. 🚥 Pre-merge checks | ✅ 6✅ Passed checks (6 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #30587 +/- ##
==========================================
- Coverage 67.71% 67.66% -0.05%
==========================================
Files 1676 1676
Lines 60538 60547 +9
Branches 10470 10472 +2
==========================================
- Hits 40992 40970 -22
- Misses 17226 17257 +31
Partials 2320 2320
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
24f30a3 to
48aee70
Compare
Store automatic excerpt and reading time as schema so later write/read paths can stop recomputing them on every API response. Strip auto_excerpt from serializers so it stays internal for now.
Drop the raw DB reading_time before computing so responses only include it when derived from html, matching pre-column behavior.
Strip auto_excerpt and reading_time from postAttribution on signup/donation events so activity-feed payloads stay unchanged until those fields are intentionally exposed.
Co-authored-by: Cursor <cursoragent@cursor.com>
d3e9f2a to
2ea556d
Compare

Summary
posts.auto_excerptandposts.reading_timecolumns (DDL only,{ algorithm: 'auto' }) so automatic excerpt and reading time can later be stored instead of recomputed on every Posts API response.schema.jsand the schema integrity hash to match.auto_excerptfrom post serializers so it stays internal;reading_timeremains the existing public API field and is still computed at read time in this PR.reading_timeinto webhook payloads before population exists.6.64/(afterv6.63.0); bumps Core + ember-admin to6.64.0-rc.0.No write-path population, backfill, or stored read path yet — those land in follow-up PRs.
Test plan
pnpm knex-migrator migratefor 6.64) and rolls back cleanlypnpm test:single test/unit/server/data/schema/integrity.test.jsauto_excerptkey;reading_time/excerptunchanged from today