开发者

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

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜