more question abolut migrate index support.

  1. Why add_column not support index: true ?
  2. Any plan to support postgres jsonb_path_ops GIN index with somethings like index: {using: "gin_path"}? it seem like more fast than gin, and less diskspace usage. I had to use like this in migrate

CREATE INDEX index_notifications_on_data ON notifications USING gin (data jsonb_path_ops);


But schema.rb is not worked, it only generate default gin index jsonb_ops instead of jsonb_path_ops.

  1. add_column is a lower level building block than t.column. The higher level methods are composed of these lower level building blocks. That’s why you get more combined behavior when using higher level constructs.

  2. There is an open PR about PostgreSQL opclass support. See Add support for PostgreSQL operator classes to add_index by gregnavis · Pull Request #19090 · rails/rails · GitHub

Cheers,

– Yves