Merge branch 'main' into glitch-soc/merge-upstream

This commit is contained in:
Claire
2021-06-03 20:47:02 +02:00
498 changed files with 1454 additions and 551 deletions

View File

@@ -14,7 +14,7 @@ module Mastodon
end
MIN_SUPPORTED_VERSION = 2019_10_01_213028
MAX_SUPPORTED_VERSION = 2021_05_07_001928
MAX_SUPPORTED_VERSION = 2021_05_26_193025
# Stubs to enjoy ActiveRecord queries while not depending on a particular
# version of the code/database

View File

@@ -41,6 +41,20 @@
module Mastodon
module MigrationHelpers
class CorruptionError < StandardError
def initialize(message = nil)
super(message.presence || 'Migration failed because of index corruption, see https://docs.joinmastodon.org/admin/troubleshooting/index-corruption/#fixing')
end
def cause
nil
end
def backtrace
[]
end
end
# Model that can be used for querying permissions of a SQL user.
class Grant < ActiveRecord::Base
self.table_name = 'information_schema.role_table_grants'

View File

@@ -102,7 +102,7 @@ module Mastodon
ActiveRecord::Base.connection_pool.with_connection do
grouped_records = type.adapter.send(:grouped_objects, records)
bulk_body = Chewy::Type::Import::BulkBuilder.new(type, grouped_records).bulk_body
bulk_body = Chewy::Type::Import::BulkBuilder.new(type, **grouped_records).bulk_body
end
index_count = grouped_records[:index].size if grouped_records.key?(:index)

View File

@@ -13,7 +13,7 @@ module Mastodon
end
def patch
0
1
end
def flags