Skip to content

Commit

Permalink
add rake task to encrypt existing events data
Browse files Browse the repository at this point in the history
  • Loading branch information
mercedesb committed Jun 26, 2023
1 parent bedecc7 commit 4406ae7
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/tasks/encrypt_event_columns.rake
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
namespace :event do
desc "update events to be encrypted with ActiveRecord encryption"
task encrypt_sensitive_columns: :environment do
Event.all.find_each do |event|
event.encrypt
end
end
end

0 comments on commit 4406ae7

Please sign in to comment.