/helms_db

My good Legolas, did you know that the caverns of Helm's Deep are vast and beautiful? Sound like your database?

Primary LanguageRuby

Helms Db

My good Legolas, did you know that the caverns of Helm’s Deep are vast and beautiful?

Sound like your database?

Do you wonder how many tables you have? Want to change the owner of all the entities in a particular db namespace? Need to generate an Entity Relationship diagram?

This is an effort to create a single CLI management interface for common databases.

Together, we can subdue your db. This day we fight!

Setup

I am (will be?) a Rails Engine.

Usage

db_config = { adapter: ‘postgresql’, database: ‘helm_db_test’ } db = Helm.find_database(db_config) #=> Postgresql::Database db.change_owner(‘Sauron’) #=> db (with new owner) db.tables #=> AR::Relationship of Tables

The Innards

  • Ruby >= 1.9.3

  • Dependencies are managed by bundler.

Design philosphies

Similar to jQuery, many methods are chainable.  If it doesn't have an obvious return value, we return the object that was acted upon (usually 'self').

Helping out

Contact me at matt@scilipoti.name Fork, tweak in feature branch, pull request.