在 Rails 中部署期间,如何无缝处理生产数据库中的迁移?

发布于 2024-08-12 08:01:19 字数 133 浏览 2 评论 0原文

将 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

小瓶盖 2024-08-19 08:01:19

执行 cap -T 并阅读 cap:deploy:migratecap:deploy:migrations

Do cap -T and read about cap:deploy:migrate and cap:deploy:migrations.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文