0
0
Fork 0

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
This commit is contained in:
Claire 2021-08-08 15:29:57 +02:00 committed by GitHub
parent 818e0b314f
commit 763ab0c7eb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 31 additions and 2 deletions

View file

@ -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