如何修改capistrano部署以自动运行Rails 3.0中的迁移 [英] How to modify capistrano deploy to automatically run migrations in Rails 3.0

查看:148
本文介绍了如何修改capistrano部署以自动运行Rails 3.0中的迁移的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

现在,我必须运行cap部署和cap部署:如果有迁移要运行,则迁移。

Right now, I have to run cap deploy and cap deploy:migrations if there are migrations to be run.

我如何修改cap部署任务以运行迁移

how I modify the cap deploy task to run migrations.

推荐答案

只需添加:

after "deploy:update_code", "deploy:migrate"

到您的 config / deploy.rb

这篇关于如何修改capistrano部署以自动运行Rails 3.0中的迁移的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆