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:
@ -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}:*")
|
||||
|
Reference in New Issue
Block a user