I read https://apidock.com/rails/ActiveRecord/ConnectionAdapters/SchemaStatements/add_index and http://guides.rubyonrails.org/active_record_migrations.html.
I don't see how to create an index like:
CREATE INDEX ON users (id DESC NULLS LAST);
Did not see docs on how to create and index with NULLS LAST
.
Rails 4.2.10
PostgreSQL
Active Record now supports NULLS LAST
in an index with the order
argument:
add_index(
:my_table,
[:my_column],
order: { my_column: "DESC NULLS LAST" }
)