Skip to content

Added email_clicked_count column to automation_action_revisions table#29532

Merged
troyciesco merged 1 commit into
mainfrom
chris-ny-1488-add-automation-revision-click-counter-migration
Jul 22, 2026
Merged

Added email_clicked_count column to automation_action_revisions table#29532
troyciesco merged 1 commit into
mainfrom
chris-ny-1488-add-automation-revision-click-counter-migration

Conversation

@cmraible

@cmraible cmraible commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

closes https://linear.app/ghost/issue/NY-1488/add-nullable-email-clicked-count-to-automation-action-revisions

Summary

  • Adds a nullable unsigned email_clicked_count column to automation_action_revisions
  • This column is dormant for now, but will be populated soon

@coderabbitai

coderabbitai Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

Adds a nullable unsigned integer email_clicked_count column to automation_action_revisions through a new migration and the database schema definition. Updates the schema integrity test’s expected hash to reflect the changed schema.

Possibly related PRs

  • TryGhost/Ghost#29322: Modifies the same table schema with another email-related column and updates the schema integrity hash.

Suggested reviewers: evanhahn, rob-ghost, troyciesco, erisds, sagzy

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly describes the main change: adding email_clicked_count to automation_action_revisions.
Description check ✅ Passed The description matches the change set and correctly summarizes the new nullable email_clicked_count column.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chris-ny-1488-add-automation-revision-click-counter-migration

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

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

General requirements

- [ ] ⚠️ Tested performance on staging database servers, as performance on local machines is not comparable to a production environment
we're just adding a dormant column to a relatively small table here, no need to test performance on staging

  • 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
  • Tested in MySQL and SQLite

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

@github-actions github-actions Bot added the migration [pull request] Includes migration for review label Jul 22, 2026
@nx-cloud

nx-cloud Bot commented Jul 22, 2026

Copy link
Copy Markdown

🤖 Nx Cloud AI Fix

Ensure the fix-ci command is configured to always run in your CI pipeline to get automatic fixes in future runs. For more information, please see https://nx.dev/ci/features/self-healing-ci


View your CI Pipeline Execution ↗ for commit 8b24207

Command Status Duration Result
nx run ghost:test:ci:integration ✅ Succeeded 2m 59s View ↗
nx run ghost:test:integration ✅ Succeeded 2m 52s View ↗
nx run ghost:test:legacy ✅ Succeeded 3m 4s View ↗
nx run ghost:test:e2e ✅ Succeeded 2m 32s View ↗
nx run-many -t test:unit -p ghost ✅ Succeeded 30s View ↗
nx run ghost-monorepo:lint:boundaries ✅ Succeeded 14s View ↗
nx run @tryghost/admin:build ✅ Succeeded 22s View ↗
nx run-many -t lint -p ghost,ghost-monorepo ✅ Succeeded 14s View ↗
nx run-many --target=build --projects=tag:publi... ✅ Succeeded <1s View ↗

💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗


☁️ Nx Cloud last updated this comment at 2026-07-22 16:51:18 UTC

@cmraible cmraible changed the title NY-1488 - Added automation revision click counter migration Added automation revision click counter migration Jul 22, 2026
@cmraible cmraible changed the title Added automation revision click counter migration Added email_clicked_count column to automation_action_revisions table Jul 22, 2026
@cmraible
cmraible marked this pull request as ready for review July 22, 2026 15:37
Base automatically changed from chris-ny-1487-add-track_clicks-and-clicked_at-to to main July 22, 2026 16:35
ref https://linear.app/ghost/issue/NY-1488/

Revision-level counters let automation reads aggregate unique clickers with the existing sent and opened analytics.
@cmraible
cmraible force-pushed the chris-ny-1488-add-automation-revision-click-counter-migration branch from 50fc515 to 8b24207 Compare July 22, 2026 16:40
@cmraible
cmraible requested a review from troyciesco July 22, 2026 16:55
@cmraible cmraible added the ok to merge for me You can merge this on my behalf if you want. label Jul 22, 2026
@troyciesco
troyciesco merged commit d66b623 into main Jul 22, 2026
50 checks passed
@troyciesco
troyciesco deleted the chris-ny-1488-add-automation-revision-click-counter-migration branch July 22, 2026 17:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

migration [pull request] Includes migration for review ok to merge for me You can merge this on my behalf if you want.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants