Skip to content

Commit

Permalink
Merge pull request #12862 from dacook/anonymise-customer-names
Browse files Browse the repository at this point in the history
Anonymise customer first and last names
  • Loading branch information
mkllnk authored Nov 28, 2024
2 parents 355c968 + 9c51615 commit 925ac2e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/tasks/data/anonymize_data.rake
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,14 @@ namespace :ofn do
unconfirmed_email = concat(id, '[email protected]')")
Customer.where(user_id: nil)
.update_all("email = concat(id, '[email protected]'),
name = concat('Customer Number ', id, ' (without connected User)')")
name = concat('Customer Number ', id, ' (without connected User)'),
first_name = concat('Customer Number ', id),
last_name = '(without connected User)'")
Customer.where.not(user_id: nil)
.update_all("email = concat(user_id, '[email protected]'),
name = concat('Customer Number ', id, ' - User ', user_id)")
name = concat('Customer Number ', id, ' - User ', user_id),
first_name = concat('Customer Number ', id),
last_name = concat('User ', user_id)")

Spree::Order.update_all("email = concat(id, '[email protected]')")
end
Expand Down

0 comments on commit 925ac2e

Please sign in to comment.