使用Capistrano 3部署Rails应用程序时跳过数据库迁移 [英] Skip database migration while deploying Rails application using Capistrano 3

查看:87
本文介绍了使用Capistrano 3部署Rails应用程序时跳过数据库迁移的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我们运行 cap deploy 时,它将在部署过程中运行所有迁移。我们必须将应用程序指向现有数据库,并且不想修改现有数据库。

When we run cap deploy, it runs all the migrations during deployment. We have to point the application to existing DB and don't want modify existing DB.

有人可以建议在部署应用程序时如何跳过迁移步骤吗?

Can anybody suggest how can we skip the migration step while deploying the application?

推荐答案

我想您正在使用 capistrano / rails

根据文档,您可以手动要求:

According to the doc, you can require just what you need manually:

# Capfile
require 'capistrano/bundler' 
require 'capistrano/rails/assets'
# require 'capistrano/rails/migrations'

这篇关于使用Capistrano 3部署Rails应用程序时跳过数据库迁移的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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