https://github.com/timakin/capistrano3-ridgepole
Capistrano3 plugin for ridgepole tasks
https://github.com/timakin/capistrano3-ridgepole
Last synced: about 1 year ago
JSON representation
Capistrano3 plugin for ridgepole tasks
- Host: GitHub
- URL: https://github.com/timakin/capistrano3-ridgepole
- Owner: timakin
- License: mit
- Created: 2016-01-04T16:55:16.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2016-01-05T14:37:16.000Z (over 10 years ago)
- Last Synced: 2024-04-24T17:09:44.968Z (about 2 years ago)
- Language: Ruby
- Homepage:
- Size: 12.7 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Capistrano3 Ridgepole
Capistrano3 plugin for db schema management with [ridgepole](https://github.com/winebarrel/ridgepole)
[](https://badge.fury.io/rb/capistrano3-ridgepole)
## Installation
Add this line to your application's Gemfile:
```ruby
gem 'capistrano3-ridgepole'
```
## Loading
In your configuration file ( `Capfile` ) , load this capistrano3-ridgepole module.
```ruby
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
```ruby
# 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
1. Fork it ( https://github.com/timakin/capistrano3-ridgepole/fork )
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create a new Pull Request