Update fix-duplicates maintenance script to support latest migrations (#16231)
* Update maintenance script to support latest database migrations * Update Account#merge_with!
This commit is contained in:
parent
2840f995d5
commit
76064e6608
2 changed files with 20 additions and 2 deletions
|
@ -15,7 +15,7 @@ module AccountMerging
|
|||
Status, StatusPin, MediaAttachment, Poll, Report, Tombstone, Favourite,
|
||||
Follow, FollowRequest, Block, Mute, AccountIdentityProof,
|
||||
AccountModerationNote, AccountPin, AccountStat, ListAccount,
|
||||
PollVote, Mention, AccountDeletionRequest, AccountNote
|
||||
PollVote, Mention, AccountDeletionRequest, AccountNote, FollowRecommendationSuppression
|
||||
]
|
||||
|
||||
owned_classes.each do |klass|
|
||||
|
@ -43,6 +43,10 @@ module AccountMerging
|
|||
end
|
||||
end
|
||||
|
||||
CanonicalEmailBlock.where(reference_account_id: other_account.id).find_each do |record|
|
||||
record.update_attribute(:reference_account_id, id)
|
||||
end
|
||||
|
||||
# Some follow relationships have moved, so the cache is stale
|
||||
Rails.cache.delete_matched("followers_hash:#{id}:*")
|
||||
Rails.cache.delete_matched("relationships:#{id}:*")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue