From: Claire Date: Thu, 7 Apr 2022 18:46:30 +0000 (+0200) Subject: Fix migration error handling (#17991) X-Git-Url: https://git.xn--scling-oua.cat.family/?a=commitdiff_plain;h=cb45c04d2642291cedd85b2483f0d827d130d6e2;p=mastodon.git Fix migration error handling (#17991) --- 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