1
0
Fork 0
mirror of https://github.com/mastodon/mastodon.git synced 2024-08-20 21:08:15 -07:00

Use db_table_exists? method in new cli/maintenance area (#29677)

This commit is contained in:
Matt Jankowski 2024-03-21 04:32:40 -04:00 committed by GitHub
parent cdd168f5d3
commit 718ee72c80
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -131,7 +131,7 @@ module Mastodon::CLI
end
end
if ActiveRecord::Base.connection.table_exists?(:severed_relationships)
if db_table_exists?(:severed_relationships)
SeveredRelationship.where(local_account_id: other_account.id).reorder(nil).find_each do |record|
record.update_attribute(:local_account_id, id)
rescue ActiveRecord::RecordNotUnique