Peegee aims to bring better support for PostgreSQL to ActiveRecord. Peegee is under active development.
###Indexes
Peegee adds support for some indexing extensions allowed by Postgres. You can run these in your migrations.
add_index :users, :column, :where => 'active = true'
add_index :users, :name => 'users_created_at_date' do |i|
i.expression 'DATE(created_at)'
end
add_index :users, :name => 'users_created_at_date' do |i|
i.column :name, :asc
i.column :active, :desc
end
Using CONCURRENTLY
add_index :users, :name, :name => 'users_name', :concurrently => true
Note that this cannot run inside of a transaction. This will commit your running transaction, add the index concurrently, and start a new transaction. Use with caution.
Peegee is distributed under the MIT license.
Copyright 2011 - Harold Giménez and Mike Burns