Difference between rake db:migrate db:reset and db:schema:load

后端 未结 5 670
佛祖请我去吃肉
佛祖请我去吃肉 2020-11-22 11:48

The difference between rake db:migrate and rake db:reset is pretty clear in my head. The thing which I don\'t understand is how rake db:schem

5条回答
  •  有刺的猬
    2020-11-22 12:27

    As far as I understand, it is going to drop your database and re-create it based on your db/schema.rb file. That is why you need to make sure that your schema.rb file is always up to date and under version control.

提交回复
热议问题