about summary refs log tree commit diff
path: root/db/migrate/20200620164023_add_fixed_lowercase_index_to_accounts.rb
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2022-03-12 08:12:57 +0100
committerGitHub <noreply@github.com>2022-03-12 08:12:57 +0100
commit75e33fd08fb4f926897490b6fa42890b393c0989 (patch)
tree3836227041ada2f5b6e389f40e1d955db19bbfa4 /db/migrate/20200620164023_add_fixed_lowercase_index_to_accounts.rb
parentbc320d6cec5900fa2fd9d3a46480e242111caaca (diff)
Fix null values being included in some indexes (#17711)
* Fix null values being included in some indexes

* Update lib/mastodon/migration_helpers.rb

Co-authored-by: Claire <claire.github-309c@sitedethib.com>

* Add documentation link to corruption error message

Co-authored-by: Claire <claire.github-309c@sitedethib.com>
Diffstat (limited to 'db/migrate/20200620164023_add_fixed_lowercase_index_to_accounts.rb')
-rw-r--r--db/migrate/20200620164023_add_fixed_lowercase_index_to_accounts.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/db/migrate/20200620164023_add_fixed_lowercase_index_to_accounts.rb b/db/migrate/20200620164023_add_fixed_lowercase_index_to_accounts.rb
index 366bf9aa7..652ce9752 100644
--- a/db/migrate/20200620164023_add_fixed_lowercase_index_to_accounts.rb
+++ b/db/migrate/20200620164023_add_fixed_lowercase_index_to_accounts.rb
@@ -16,7 +16,7 @@ class AddFixedLowercaseIndexToAccounts < ActiveRecord::Migration[5.2]
       add_index :accounts, "lower (username), COALESCE(lower(domain), '')", name: 'index_accounts_on_username_and_domain_lower', unique: true, algorithm: :concurrently
     rescue ActiveRecord::RecordNotUnique
       remove_index :accounts, name: 'index_accounts_on_username_and_domain_lower'
-      raise CorruptionError
+      raise CorruptionError.new('index_accounts_on_username_and_domain_lower')
     end
 
     remove_index :accounts, name: 'old_index_accounts_on_username_and_domain_lower' if index_name_exists?(:accounts, 'old_index_accounts_on_username_and_domain_lower')