From c1b85d1f997cc809057f8c2d5362024f5257dd50 Mon Sep 17 00:00:00 2001 From: Claire Date: Thu, 7 Apr 2022 20:46:30 +0200 Subject: [PATCH] Fix migration error handling (#17991) --- lib/mastodon/migration_helpers.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/mastodon/migration_helpers.rb b/lib/mastodon/migration_helpers.rb index beef833621..2ab8150ec9 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