Skip to content

ankane/gindex

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
lib
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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[7.1]
  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

TODO

  • add :name option to long index names

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

About

Concurrent index migrations for Rails

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages