开发者

Migrate down with only one migration

In order to test a new Rails plugin that I wrote, I'd like to check if the migration of that plugin works correctly. So I created a new test app, added the plugin, generated the migration and migrated up (which works fine). I now would also like to check the down migration. But rake db:migrat开发者_StackOverflowe:down wants a version number. What should I provide? It is the only migration and VERSION=0 doesn't work.


See the Official Guides

rake db:rollback
rake db:rollback STEP=3
rake db:migrate:down

# rollback-then-migrate-forward combo
rake db:migrate:redo
rake db:migrate:redo STEP=3
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜