I recently ran into this same issue when building the Docker config at github/forem/forem.
This is not very helpful, but my temporary "fix" was to comment out the offending index_exists? invocations in that particular migration and then everything was ok..ish:
$ git diff db/migrate/20200731033002_drop_user_optional_fields.rb
diff --git a/db/migrate/20200731033002_drop_user_optional_fields.rb b/db/migrate/20200731033002_drop_user_optional_fields.rb
index c66dcd6..8928fad 100644
--- a/db/migrate/20200731033002_drop_user_optional_fields.rb
+++ b/db/migrate/20200731033002_drop_user_optional_fields.rb
@@ -4,7 +4,7 @@ class DropUserOptionalFields < ActiveRecord::Migration[6.0]
def up
drop_table :user_optional_fields
- remove_index(*INDEX) if index_exists?(*INDEX)
+ # remove_index(*INDEX) if index_exists?(*INDEX)
end
def down
@@ -16,7 +16,6 @@ def down
t.timestamps
end
- add_index(*INDEX) unless index_exists?(*INDEX)
+ # add_index(*INDEX) unless index_exists?(*INDEX)
end
end
-
I recently ran into this same issue when building the Docker config at github/forem/forem.
This is not very helpful, but my temporary "fix" was to comment out the offending
index_exists?
invocations in that particular migration and then everything was ok..ish:Hi, thank you, I will try :)