Giter VIP home page Giter VIP logo

capistrano-rails-db's Introduction

Capistrano::Rails::Db

Rails migration tasks for Capistrano v3:

Run cap -T deploy:db in the terminal to get a full list of the migration tasks:

cap deploy:db:abort_if_pending_migrations  # Run rake db:abort_if_pending_migrations
cap deploy:db:create                       # Run rake db:create
cap deploy:db:drop                         # Run rake db:drop
cap deploy:db:migrate                      # Run rake db:migrate         Migrate the database (options: VERSION=x, VERBOSE=false, SCOPE=blog)
cap deploy:db:migrate:down                 # Run rake db:migrate:down    Run the "down" for a given migration VERSION
cap deploy:db:migrate:redo                 # Run rake db:migrate:redo    Rollback the database one migration and re migrate up (options: STEP=x, VERSION=x)
cap deploy:db:migrate:reset                # Run rake db:migrate:reset   Reset your database using your migrations
cap deploy:db:migrate:status               # Run rake db:migrate:status  Display status of migrations
cap deploy:db:migrate:up                   # Run rake db:migrate:up      Run the "up" for a given migration VERSION
cap deploy:db:reset                        # Run rake db:reset           Drop and recreate the database from db/schema.rb and load the seeds
cap deploy:db:rollback                     # Run rake db:rollback        Roll the schema back to the previous version (specify steps w/ STEP=n)
cap deploy:db:seed                         # Run rake db:seed            Load the seed data from db/seed.rb
cap deploy:db:setup                        # Run rake db:setup           Create the database, load the schema, and initialize with the seed data
cap deploy:db:version                      # Run rake db:version         Retrieve the current schema version number

Installation

Add this line to your application's Gemfile:

gem 'capistrano',  '~> 3.1'
gem 'capistrano-rails', '~> 1.1'
gem 'capistrano-rails-db'

Usage

# Capfile
require 'capistrano/rails'
require 'capistrano/rails/db'

Please note that any require should be placed in Capfile, not config/deploy.rb.

Contributing

  1. Fork it
  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 new Pull Request

capistrano-rails-db's People

Contributors

kentaroi avatar omstrumpf avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.