Skip to content

Commit

Permalink
updating lol_dba version and also improving the readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Diego Plentz committed Mar 24, 2013
1 parent 427bc55 commit a922318
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 14 deletions.
34 changes: 21 additions & 13 deletions README.md
Expand Up @@ -2,27 +2,33 @@

lol_dba is a small package of rake tasks that scan your application models and displays a list of columns that probably should be indexed. Also, it can generate .sql migration scripts. Most of the code come from rails_indexes and migration_sql_generator.

### Installation
### Quick example

Add lol_dba to your Gemfile:
To use lol_dba in the easiest way possible you have to do two things:

gem "lol_dba"
gem install lol_dba

and install gem
Then choose one of the follogin commands:

bundle install
* ```lol_dba db:find_indexes```: display a migration for adding/removing all necessary indexes based on associations
* ```lol_dba db:migrate_sql```: generate .sql files for all your migrations inside db/migrate_sql folder.

### Not-so-quick example

If you want to use lol_dba with rake, you should do a few more steps:

### Usage
Add lol_dba to your Gemfile

Display a migration for adding/removing all necessary indexes based on associations:
gem "lol_dba"

rake db:find_indexes
Run the install command

Generate .sql files for all your migrations inside db/migrate_sql folder:
bundle install

rake db:migrate_sql
Use it the same way you use other rake commands

Note that create an index in a big database may take a long time.
rake db:find_indexes
rake db:migrate_sql

### Compatibility

Expand All @@ -36,8 +42,9 @@ For this reason, we no longer suggest to add indexes to primary keys.

### Tests

bundle install
rake
To run lol_dba tests, just clone the repo and run:

bundle install && rake

to run the tests.

Expand All @@ -53,6 +60,7 @@ All feedback, bug reports and thoughts on this gratefully received.
* [Jay Fields](http://jayfields.com/)
* [Muness Alrubaie](http://muness.blogspot.com/)
* [Vladimir Sharshov](https://github.com/warpc)
* [Fabio Rehm](http://fabiorehm.com/)

### License

Expand Down
2 changes: 1 addition & 1 deletion lib/lol_dba/version.rb
@@ -1,3 +1,3 @@
module LolDba
VERSION = "1.4.3" unless defined? LolDba::VERSION
VERSION = "1.5.0" unless defined? LolDba::VERSION
end

0 comments on commit a922318

Please sign in to comment.