Reset the database (purge all), then seed a database

后端 未结 6 904
感情败类
感情败类 2021-01-29 18:09

Is there a rake command to wipe out the data in the database tables?

How do I create a db:seed script to pre-fill data to my tables?

6条回答
  •  醉梦人生
    2021-01-29 18:38

    As of Rails 5, the rake commandline tool has been aliased as rails so now

    rails db:reset instead of rake db:reset

    will work just as well

提交回复
热议问题