Capistrano3 Ridgepole
Capistrano3 plugin for db schema management with ridgepole
Installation
Add this line to your application's Gemfile:
gem 'capistrano3-ridgepole'
Loading
In your configuration file ( Capfile
) , load this capistrano3-ridgepole module.
require 'capistrano3/ridgepole'
Supported tasks' usage
cap ridgepole:apply # Apply Schemafile with ridgepole
cap ridgepole:diff # Show difference that will be created by schema application
cap ridgepole:dry_run # Test Schemafile application with ridgepole dry-run
Options
# Target server(role) where you'll apply the database schema settings.
set :ridgepole_roles, :db
# Path of Schemafile (default path is root of your app directory)
set :ridgepole_schema_file, File.join((fetch(:current_path)), "Schemafile")
# Path of database.yml (default path is config/database.yml)
set :ridgepole_config_file, File.join(fetch(:current_path), "config", "database.yml")
# Environment of rails application that you'd apply schema. (default env is "development")
set :ridgepole_env, fetch(:rails_env)
# Additional ridgepole options (default is empty)
set :ridgepole_options, "--alter-extra='LOCK=NONE' --debug"
Contributing
- Fork it ( https://github.com/timakin/capistrano3-ridgepole/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request