如何在Rails 3中删除迁移文件 [英] How to delete migration files in Rails 3
问题描述
我想删除/删除迁移文件。我将如何去做呢?我知道这里有类似的问题,但作为更新,有没有更好的方法比做脚本/销毁?
另外,我应该做一个 如果您的应用程序已经在生产或分期阶段,那么只需编写另一个销毁您的表或列的迁移就可以了。 迁移的另一个重要参考是: http://guides.rubyonrails.org/migrations。 HTML I would like to remove/delete a migration file. How would I go about doing that? I know there are similar questions on here but as an update, is there a better way than doing script/destroy? Also, should I do a I usually: If your application is already on production or staging, it's safer to just write another migration that destroys your table or columns. Another great reference for migrations is: http://guides.rubyonrails.org/migrations.html 这篇关于如何在Rails 3中删除迁移文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋! db:reset
或 db:drop
如果我删除/删除迁移?执行一个 rake db:migrate VERSION =
XXX
在所有环境中,到我要删除的版本之前。
rake db:migrate
。 $ b
db:reset
or db:drop
if I remove/delete a migration?
rake db:migrate VERSION=XXX
on all environments, to the version before the one I want to delete.rake db:migrate
again.