about summary refs log tree commit diff
path: root/lib
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2022-04-07 20:46:30 +0200
committerGitHub <noreply@github.com>2022-04-07 20:46:30 +0200
commitcb45c04d2642291cedd85b2483f0d827d130d6e2 (patch)
treeea6e029dc70bf3b7a562d7293ca4dc94f0678071 /lib
parent5f0fc639dada7a58d2bb5524b4ec081ee6cc143f (diff)
Fix migration error handling (#17991)
Diffstat (limited to 'lib')
-rw-r--r--lib/mastodon/migration_helpers.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/mastodon/migration_helpers.rb b/lib/mastodon/migration_helpers.rb
index beef83362..2ab8150ec 100644
--- a/lib/mastodon/migration_helpers.rb
+++ b/lib/mastodon/migration_helpers.rb
@@ -812,7 +812,7 @@ module Mastodon
     # removing the old one
     def update_index(table_name, index_name, columns, **index_options)
       if index_name_exists?(table_name, "#{index_name}_new") && index_name_exists?(table_name, index_name)
-        remove_index table_name, "#{index_name}_new"
+        remove_index table_name, name: "#{index_name}_new"
       elsif index_name_exists?(table_name, "#{index_name}_new")
         # Very unlikely case where the script has been interrupted during/after removal but before renaming
         rename_index table_name, "#{index_name}_new", index_name