diff options
author | Claire <claire.github-309c@sitedethib.com> | 2021-06-03 22:30:38 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-03 22:30:38 +0200 |
commit | db5baf3d1a93cbf6961f721205cff0beaf71bffd (patch) | |
tree | a052f6043b22122a84eb1219f0ffba3ba8870a6a /lib | |
parent | 02dffa8edd097014578774aed30249ed08d2f3a4 (diff) | |
parent | 1ac5427ddceb166764b63ba92421f04a0f6fde38 (diff) |
Merge pull request #1547 from ClearlyClaire/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'lib')
-rw-r--r-- | lib/mastodon/maintenance_cli.rb | 2 | ||||
-rw-r--r-- | lib/mastodon/migration_helpers.rb | 14 | ||||
-rw-r--r-- | lib/mastodon/search_cli.rb | 2 | ||||
-rw-r--r-- | lib/mastodon/version.rb | 2 | ||||
-rw-r--r-- | lib/tasks/emojis.rake | 2 |
5 files changed, 18 insertions, 4 deletions
diff --git a/lib/mastodon/maintenance_cli.rb b/lib/mastodon/maintenance_cli.rb index 8e2084e33..47e2d78bb 100644 --- a/lib/mastodon/maintenance_cli.rb +++ b/lib/mastodon/maintenance_cli.rb @@ -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 diff --git a/lib/mastodon/migration_helpers.rb b/lib/mastodon/migration_helpers.rb index 521d903bf..39a6e0680 100644 --- a/lib/mastodon/migration_helpers.rb +++ b/lib/mastodon/migration_helpers.rb @@ -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' diff --git a/lib/mastodon/search_cli.rb b/lib/mastodon/search_cli.rb index c0491744b..0126dfcff 100644 --- a/lib/mastodon/search_cli.rb +++ b/lib/mastodon/search_cli.rb @@ -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) diff --git a/lib/mastodon/version.rb b/lib/mastodon/version.rb index ff0e694b7..00762f342 100644 --- a/lib/mastodon/version.rb +++ b/lib/mastodon/version.rb @@ -13,7 +13,7 @@ module Mastodon end def patch - 0 + 1 end def flags diff --git a/lib/tasks/emojis.rake b/lib/tasks/emojis.rake index a373e7652..8faa48a95 100644 --- a/lib/tasks/emojis.rake +++ b/lib/tasks/emojis.rake @@ -45,7 +45,7 @@ end namespace :emojis do desc 'Generate a unicode to filename mapping' task :generate do - source = 'http://www.unicode.org/Public/emoji/12.0/emoji-test.txt' + source = 'http://www.unicode.org/Public/emoji/13.1/emoji-test.txt' codes = [] dest = Rails.root.join('app', 'javascript', 'mastodon', 'features', 'emoji', 'emoji_map.json') |