-
-
Notifications
You must be signed in to change notification settings - Fork 204
refactor: make member_email_deliveries a typed log #2832
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
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
89b9986
refactor: make member_email_deliveries a typed log
mroderick a340ed0
Update app/mailers/concerns/email_delivery.rb
mroderick efb3c13
Update spec/mailers/member_mailer_spec.rb
mroderick 4e34ecb
Update spec/services/three_month_email_service_spec.rb
mroderick 1e02c61
Update spec/services/three_month_email_service_spec.rb
mroderick 2f383d8
Update spec/services/three_month_email_service_spec.rb
mroderick b6ab4c3
Update spec/services/three_month_email_service_spec.rb
mroderick File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
db/migrate/20260831100000_add_email_type_to_member_email_deliveries.rb
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| class AddEmailTypeToMemberEmailDeliveries < ActiveRecord::Migration[8.1] | ||
| def change | ||
| # 'chaser' backfills existing rows (the only mailer action logging today); | ||
| # the default is then dropped so every writer must set the type explicitly. | ||
| add_column :member_email_deliveries, :email_type, :string, default: 'chaser', null: false | ||
| change_column_default :member_email_deliveries, :email_type, from: 'chaser', to: nil | ||
| end | ||
| end |
7 changes: 7 additions & 0 deletions
7
db/migrate/20260831100100_add_unique_index_on_member_email_deliveries_member_and_type.rb
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| class AddUniqueIndexOnMemberEmailDeliveriesMemberAndType < ActiveRecord::Migration[8.1] | ||
| disable_ddl_transaction! | ||
|
|
||
| def change | ||
| add_index :member_email_deliveries, %i[member_id email_type], unique: true, algorithm: :concurrently | ||
| end | ||
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.