Skip database migration while deploying Rails application using Capistrano 3

拟墨画扇 提交于 2019-12-03 12:53:42

问题


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?


回答1:


I suppose you are using 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'


来源:https://stackoverflow.com/questions/28300592/skip-database-migration-while-deploying-rails-application-using-capistrano-3

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!