README.md in index_shotgun-0.1.0 vs README.md in index_shotgun-0.2.0

- old
+ new

@@ -3,11 +3,11 @@ [![Build Status](https://travis-ci.org/sue445/index_shotgun.svg?branch=master)](https://travis-ci.org/sue445/index_shotgun) [![Code Climate](https://codeclimate.com/github/sue445/index_shotgun/badges/gpa.svg)](https://codeclimate.com/github/sue445/index_shotgun) [![Coverage Status](https://coveralls.io/repos/sue445/index_shotgun/badge.svg?branch=master&service=github)](https://coveralls.io/github/sue445/index_shotgun?branch=master) [![Dependency Status](https://gemnasium.com/sue445/index_shotgun.svg)](https://gemnasium.com/sue445/index_shotgun) -Duplicate index checker. +Duplicate index checker. This like [pt-duplicate-key-checker](https://www.percona.com/doc/percona-toolkit/2.1/pt-duplicate-key-checker.html), but also supports database other than MySQL ## Example ```sh @@ -60,11 +60,21 @@ ``` And then execute: ```sh -$ bundle +# MySQL +$ bundle install --without oracle postgresql sqlite3 + +# Oracle +$ bundle install --without mysql postgresql sqlite3 + +# PostgreSQL +$ bundle install --without mysql oracle sqlite3 + +# sqlite3 +$ bundle install --without mysql oracle postgresql ``` Or install it yourself as: ```sh @@ -75,10 +85,13 @@ ```sh # MySQL $ gem install mysql2 -v 0.3.20 +# Oracle +$ gem install activerecord-oracle_enhanced-adapter ruby-oci8 + # PostgreSQL $ gem install pg # sqlite3 $ gem install sqlite3 @@ -107,15 +120,97 @@ ```sh $ index_shotgun Commands: index_shotgun help [COMMAND] # Describe available commands or one specific command index_shotgun mysql --database=DATABASE # Search duplicate indexes on MySQL + index_shotgun oracle --database=DATABASE # Search duplicate indexes on Oracle index_shotgun postgresql --database=DATABASE # Search duplicate indexes on PostgreSQL index_shotgun sqlite3 --database=DATABASE # Search duplicate indexes on sqlite3 index_shotgun version # Show index_shotgun version ``` **Details:** check `index_shotgun help <database>` + +#### MySQL +```sh +$ index_shotgun help mysql +Usage: + index_shotgun mysql d, --database=DATABASE + +Options: + d, --database=DATABASE + [--encoding=ENCODING] + # Default: utf8 + [--pool=N] + # Default: 5 + h, [--host=HOST] + # Default: localhost + P, [--port=N] + # Default: 3306 + u, [--username=USERNAME] + p, [--password=PASSWORD] + [--ask-password], [--no-ask-password] + +Search duplicate indexes on MySQL +``` + +#### Oracle +```sh +$ index_shotgun help oracle +Usage: + index_shotgun oracle d, --database=DATABASE + +Options: + d, --database=DATABASE + [--encoding=ENCODING] + # Default: utf8 + [--pool=N] + # Default: 5 + h, [--host=HOST] + # Default: localhost + P, [--port=N] + # Default: 1521 + u, [--username=USERNAME] + p, [--password=PASSWORD] + [--ask-password], [--no-ask-password] + +Search duplicate indexes on Oracle +``` + +#### PostgreSQL +```sh +$ index_shotgun help postgresql +Usage: + index_shotgun postgresql d, --database=DATABASE + +Options: + d, --database=DATABASE + [--encoding=ENCODING] + # Default: utf8 + [--pool=N] + # Default: 5 + h, [--host=HOST] + # Default: localhost + P, [--port=N] + # Default: 5432 + u, [--username=USERNAME] + p, [--password=PASSWORD] + [--ask-password], [--no-ask-password] + +Search duplicate indexes on PostgreSQL +``` + +#### SQLite3 +```sh +$ index_shotgun help sqlite3 +Usage: + index_shotgun sqlite3 d, --database=DATABASE + +Options: + d, --database=DATABASE + +Search duplicate indexes on sqlite3 +``` ## Development After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment. Run `bundle exec index_shotgun` to use the gem in this directory, ignoring other installed copies of this gem.