From 763ab0c7eb5430235ca8a354d11e00de1d8ba6dd Mon Sep 17 00:00:00 2001 From: Claire Date: Sun, 8 Aug 2021 15:29:57 +0200 Subject: Fix owned account notes not being deleted when an account is deleted (#16579) * Add account_notes relationship * Add tests * Fix owned account notes not being deleted when an account is deleted * Add post-migration to clean up orphaned account notes --- app/services/delete_account_service.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'app/services/delete_account_service.rb') diff --git a/app/services/delete_account_service.rb b/app/services/delete_account_service.rb index 182f0e127..d8270498a 100644 --- a/app/services/delete_account_service.rb +++ b/app/services/delete_account_service.rb @@ -4,6 +4,7 @@ class DeleteAccountService < BaseService include Payloadable ASSOCIATIONS_ON_SUSPEND = %w( + account_notes account_pins active_relationships aliases @@ -34,6 +35,7 @@ class DeleteAccountService < BaseService # by foreign keys, making them safe to delete without loading # into memory ASSOCIATIONS_WITHOUT_SIDE_EFFECTS = %w( + account_notes account_pins aliases conversation_mutes -- cgit