Skip to content

Rails 5: include opclasses in rails 5 schema dump

What does this MR do?

RAILS5=1 bin/rake db:schema:dump included lines like:

t.index ["description"], name: "index_issues_on_description_trigram", using: :gin, comment: {"description"=>"gin_trgm_ops"}

Rails 5 uses indexes_in_create in the schema dumper: https://github.com/rails/rails/commit/74b5112282f0ae796800ed6533e0930681310b10. Now the Rails 5 schema includes lines like:

t.index ["description"], name: "index_issues_on_description_trigram", using: :gin, opclasses: {"description"=>"gin_trgm_ops"}

Question:

Isn't is easier to just include the comment everywhere as nil even for Rails 4? These Rails 5 checks can then go away. I'm not sure if the rest of the code can handle this extra attribute being there...

What are the relevant issue numbers?

Does this MR meet the acceptance criteria?

Edited by Yorick Peterse

Merge request reports