Want to re-create table when running rake db:seed
I want to remove all tables and re-created the db when I run
rake db:create
The 开发者_如何学JAVAreason is the id's on the tables are not set to 1, so I figured i can just re-create the db if its possible, or call truncate.
rake db:reset
may be what you are looking for. or...
rake db:drop
rake db:create
Try rake db:reset
(in Rails 3)
In Rails 2, maybe this will help: http://pivotallabs.com/users/alex/blog/articles/305-collapsing-migrations
精彩评论