diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/mastodon/migration_helpers.rb | 14 |
1 files changed, 14 insertions, 0 deletions
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' |