rails/rails — pull request #9451 by techpeace (2013-02-26 22:40:15+00:00)
Title: Add support for custom index types

This is an updated version of [#6101](https://github.com/rails/rails/pull/6101). I just squashed it and added a CHANGELOG entry, as per @steveklabnik's request. I also had to make a small tweak, but it was a one-line change. The majority of the work is still @MSNexploder's.

The original pull request adds a `:type` option to `add_index` for the Postgresql and MySQL adapters that allows custom index type support:

```ruby
add_index(:wikis, :body, :type => 'gin')
```

@jeremy [noted](https://github.com/rails/rails/pull/6101#issuecomment-10462053) that perhaps this should be a `:using` option, since that would better reflect the SQL syntax. I'd be happy to make that change, if that sounds better.