user984621
user984621

Reputation: 48443

Capistrano - how to run a single migration?

Is there any way to run a single migration through Capistrano?

I know about

deploy:migrate
deploy:migrations

But is there something like

cap staging deploy:migrate:up VERSION=version_number

?

Thank you

Upvotes: 0

Views: 160

Answers (1)

Kentaro Imai
Kentaro Imai

Reputation: 654

I just created a gem for this purpose: capistrano-rails-db (Github)

For example, you can run a specific migration up as follows:

cap staging deploy:db:migrate:up VERSION=version_number

Upvotes: 1

Related Questions