只进行一次迁移 [英] Rake just one migration
本文介绍了只进行一次迁移的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试在我的 rails 应用程序中只运行一个迁移.我怎样才能做到这一点?我不想在它之前或之后运行任何迁移.谢谢.
I'm trying to run just one migration out of a whole bunch in my rails app. How can I do this? I don't want to run any of the migrations before or after it. Thanks.
推荐答案
rake db:migrate:redo VERSION=xxxxxxx
,但是会运行 down
然后up
步骤.您可以结合临时注释掉向下步骤来执行此操作.
rake db:migrate:redo VERSION=xxxxxxx
, but that will run the down
and then the up
step. You could do this in conjunction with commenting out the down step temporarily.
这篇关于只进行一次迁移的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文