Removed "member not found" option from welcome email automation runs#27457
Removed "member not found" option from welcome email automation runs#27457troyciesco merged 2 commits intomainfrom
Conversation
WalkthroughThis pull request removes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
This comment was marked as outdated.
This comment was marked as outdated.
ec722ee to
9ae35e1
Compare
9ae35e1 to
50c6d46
Compare
ref https://linear.app/ghost/issue/NY-1192 Turns out that this value will never be set because of cascade deletions. Let's drop the option.
50c6d46 to
73fc594
Compare
| ready_at: {type: 'dateTime', nullable: true}, | ||
| step_started_at: {type: 'dateTime', nullable: true}, | ||
| step_attempts: {type: 'integer', unsigned: true, nullable: false, defaultTo: 0}, | ||
| exit_reason: {type: 'string', maxlength: 50, nullable: true, validations: {isIn: [['member not found', 'email send failed', 'member unsubscribed', 'member changed status', 'finished']]}}, |
There was a problem hiding this comment.
Theoretically, we should create a database migration to drop these rows.
Practically, no such rows should exit. We never had code to create them, and any relevant code is development-only right now.
(The original migration mentioned this value and I don't think we need to drop it. In other words, I don't think these validations got encoded into the schema.)
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@ghost/core/core/server/data/schema/schema.js`:
- Line 1202: Update the 6.29 migration that sets the newsletters table/column
validation for exit_reason so its validations.isIn array matches the runtime
schema: remove the "member not found" entry from the exit_reason allowed values
(the same field referenced as exit_reason with validations.isIn), ensuring the
migration's enum/list no longer contains that value and preserving the other
values ("email send failed", "member unsubscribed", "member changed status",
"finished").
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 81abc2e2-8619-4f33-b5cc-271619d418f6
📒 Files selected for processing (2)
ghost/core/core/server/data/schema/schema.jsghost/core/core/server/services/welcome-email-automations/poll.js
|



closes https://linear.app/ghost/issue/NY-1192
ref #27456
Turns out that this value will never be set because of cascade deletions. Let's drop the option.