Skip to content

Commit

Permalink
Add populate_recipient Rake task
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasleese committed Jan 28, 2025
1 parent cd49abe commit 65c5b33
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions lib/tasks/notify_log_entries.rake
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# frozen_string_literal: true

namespace :notify_log_entries do
desc "Set the recipient column from the recipient_deterministic column."
task populate_recipient: :environment do
NotifyLogEntry
.where(recipient: nil)
.find_each do |entry|
entry.update!(receipient: entry.recipient_deterministic)
end
end
end

0 comments on commit 65c5b33

Please sign in to comment.