In Rails it is possible to do:
add_index :table, :column_name, :using => 'btree'
Is it possible in Rails 4 with PGSQL to add a GIN
or GiST
index like:
add_index :students, :name, :using => 'gin'
Or do I have use manual execute statements? The notion behind this is I would like to keep schema.rb instead of using structure.sql
In Rails 4, you can now do something like this in a migration:
add_index :products, :data, using: :gin
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With