Ridgepole-rails
Ridgepole-rails provides two Rake tasks: ridgepole:export and ridgepole:apply
They wrap ridgepole's ridgepole --export and
ridgepole --apply respectively.
Usage
To export current schema of the database to Schemafile
rake ridgepole:export
To apply Schemafile to the database
rake ridgepole:apply
Some db tasks of Rails are replaced as follows:
-
db:migrateinvokesridgepole:applythenridgepole:export -
db:schema:dumpinvokesridgepole:export -
db:schema:loadinvokesridgepole:apply -
db:test:loadinvokesridgepole:applywith first argument:test -
db:migrate:status,db:rollbackanddb:versionare undefined
TODO: Some means not to replace these tasks above.
Installation
Add this line to your application's Gemfile:
gem 'ridgepole-rails'And then execute:
$ bundleOr install it yourself as:
$ gem install ridgepole-railsContributing
Contribution directions go here.
License
The gem is available as open source under the terms of the MIT License.