在 Rails 中部署期间,如何无缝处理生产数据库中的迁移?
将 db:migrate 放入我的 capistrano 任务中(也许在更新代码之前)是否是标准做法?我不想忘记在生产中添加一列并出现错误,所以我觉得应该有一种无缝的方法来做到这一点。按照我说的方法做有什么问题吗? ...只是想知道这里的标准做法是什么
Is it standard practice to put db:migrate in my capistrano task, maybe before updating the code? I don't want to forget to add a column to production and get errors so I feel like there should be a seamless way to do this. Is there anything wrong with doing it the way I mentioned? ...just wondering what the standard practice is here
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
执行
cap -T
并阅读cap:deploy:migrate
和cap:deploy:migrations
。Do
cap -T
and read aboutcap:deploy:migrate
andcap:deploy:migrations
.