Merge remote-tracking branch 'parent/main' into upstream-20240906

This commit is contained in:
KMY 2024-09-06 08:42:24 +09:00
commit f18eabfe75
689 changed files with 4369 additions and 2434 deletions

View file

@ -2,8 +2,8 @@
class RemoveUnneededIndexes < ActiveRecord::Migration[5.0]
def change
remove_index :notifications, name: 'index_notifications_on_account_id'
remove_index :settings, name: 'index_settings_on_target_type_and_target_id'
remove_index :statuses_tags, name: 'index_statuses_tags_on_tag_id'
remove_index :notifications, :account_id, name: 'index_notifications_on_account_id'
remove_index :settings, [:target_type, :target_id], name: 'index_settings_on_target_type_and_target_id'
remove_index :statuses_tags, :tag_id, name: 'index_statuses_tags_on_tag_id'
end
end

View file

@ -2,7 +2,7 @@
class FixReblogsInFeeds < ActiveRecord::Migration[5.1]
def up
redis = RedisConfiguration.pool.checkout
redis = RedisConnection.pool.checkout
fm = FeedManager.instance
# Old scheme:

View file

@ -5,6 +5,6 @@ class AddIndexOnStreamEntries < ActiveRecord::Migration[5.2]
def change
add_index :stream_entries, [:account_id, :activity_type, :id], algorithm: :concurrently
remove_index :stream_entries, name: :index_stream_entries_on_account_id
remove_index :stream_entries, :account_id, name: :index_stream_entries_on_account_id
end
end

View file

@ -2,7 +2,7 @@
class RemoveDuplicateIndexesInLists < ActiveRecord::Migration[5.2]
def change
remove_index :list_accounts, name: 'index_list_accounts_on_account_id'
remove_index :list_accounts, name: 'index_list_accounts_on_list_id'
remove_index :list_accounts, :account_id, name: 'index_list_accounts_on_account_id'
remove_index :list_accounts, :list_id, name: 'index_list_accounts_on_list_id'
end
end

View file

@ -5,6 +5,6 @@ class MoreFasterIndexOnNotifications < ActiveRecord::Migration[5.2]
def change
add_index :notifications, [:account_id, :id], order: { id: :desc }, algorithm: :concurrently
remove_index :notifications, name: :index_notifications_on_id_and_account_id_and_activity_type
remove_index :notifications, [:id, :account_id, :activity_type], name: :index_notifications_on_id_and_account_id_and_activity_type
end
end

View file

@ -7,6 +7,6 @@ class AddIndexOnStatusesForApiV1AccountsAccountIdStatuses < ActiveRecord::Migrat
safety_assured do
add_index :statuses, [:account_id, :id, :visibility, :updated_at], order: { id: :desc }, algorithm: :concurrently, name: :index_statuses_20180106
end
remove_index :statuses, name: :index_statuses_on_account_id_id
remove_index :statuses, [:account_id, :id], name: :index_statuses_on_account_id_id
end
end

View file

@ -2,8 +2,8 @@
class RemoveUnusedIndexes < ActiveRecord::Migration[5.2]
def change
remove_index :statuses, name: 'index_statuses_on_conversation_id'
remove_index :users, name: 'index_users_on_filtered_languages'
remove_index :backups, name: 'index_backups_on_user_id'
remove_index :statuses, :conversation_id, name: 'index_statuses_on_conversation_id'
remove_index :users, :filtered_languages, name: 'index_users_on_filtered_languages'
remove_index :backups, :user_id, name: 'index_backups_on_user_id'
end
end

View file

@ -4,7 +4,7 @@ class MigrateUnavailableInboxes < ActiveRecord::Migration[5.2]
disable_ddl_transaction!
def up
redis = RedisConfiguration.pool.checkout
redis = RedisConnection.pool.checkout
urls = redis.smembers('unavailable_inboxes')
hosts = urls.filter_map do |url|