From 718ee72c8073fe8851a29dc930fd78a41335906c Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Thu, 21 Mar 2024 04:32:40 -0400 Subject: [PATCH] Use `db_table_exists?` method in new cli/maintenance area (#29677) --- lib/mastodon/cli/maintenance.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/mastodon/cli/maintenance.rb b/lib/mastodon/cli/maintenance.rb index f376bcee0..2e7c85707 100644 --- a/lib/mastodon/cli/maintenance.rb +++ b/lib/mastodon/cli/maintenance.rb @@ -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