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
精彩评论