Skip to content
/ gindex Public

Concurrent index migrations for Rails

License

Notifications You must be signed in to change notification settings

ankane/gindex

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

g index

🚤 Instant concurrent index migrations for Rails

Build Status

Installation

Add this line to your application’s Gemfile:

gem "gindex", group: :development

How It Works

rails g index users email

generates:

class AddIndexOnEmailToUsers < ActiveRecord::Migration[8.0]
  disable_ddl_transaction!

  def change
    add_index :users, :email, algorithm: :concurrently
  end
end

Also works with multi-column indexes

rails g index deliveries store_id delivered_at

History

View the changelog

Contributing

Everyone is encouraged to help improve this project. Here are a few ways you can help:

To get started with development:

git clone https://github.com/ankane/gindex.git
cd gindex
bundle install
bundle exec rake test

About

Concurrent index migrations for Rails

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages