Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ankane/gindex
Concurrent index migrations for Rails
https://github.com/ankane/gindex
Last synced: 5 days ago
JSON representation
Concurrent index migrations for Rails
- Host: GitHub
- URL: https://github.com/ankane/gindex
- Owner: ankane
- License: mit
- Created: 2015-07-16T07:20:53.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2024-10-27T18:04:12.000Z (7 days ago)
- Last Synced: 2024-10-27T21:45:56.789Z (7 days ago)
- Language: Ruby
- Homepage:
- Size: 24.4 KB
- Stars: 42
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# g index
:speedboat: Instant **concurrent** index migrations for Rails
[![Build Status](https://github.com/ankane/gindex/actions/workflows/build.yml/badge.svg)](https://github.com/ankane/gindex/actions)
## Installation
Add this line to your application’s Gemfile:
```ruby
gem "gindex", group: :development
```## How It Works
```sh
rails g index users email
```generates:
```ruby
class AddIndexOnEmailToUsers < ActiveRecord::Migration[7.2]
disable_ddl_transaction!def change
add_index :users, :email, algorithm: :concurrently
end
end
```Also works with multi-column indexes
```sh
rails g index deliveries store_id delivered_at
```## TODO
- add `:name` option to long index names
## History
View the [changelog](https://github.com/ankane/gindex/blob/master/CHANGELOG.md)
## Contributing
Everyone is encouraged to help improve this project. Here are a few ways you can help:
- [Report bugs](https://github.com/ankane/gindex/issues)
- Fix bugs and [submit pull requests](https://github.com/ankane/gindex/pulls)
- Write, clarify, or fix documentation
- Suggest or add new featuresTo get started with development:
```sh
git clone https://github.com/ankane/gindex.git
cd gindex
bundle install
```