Merge branch 'main' into glitch-soc/merge-upstream
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -13,7 +13,7 @@ module Mastodon
|
||||
end
|
||||
|
||||
def patch
|
||||
0
|
||||
1
|
||||
end
|
||||
|
||||
def flags
|
||||
|
||||
Reference in New Issue
Block a user