rake db:schema:load vs. migrations

前端 未结 7 1131
伪装坚强ぢ
伪装坚强ぢ 2020-11-27 09:39

Very simple question here - if migrations can get slow and cumbersome as an app gets more complex and if we have the much cleaner rake db:schema:load to call in

7条回答
  •  爱一瞬间的悲伤
    2020-11-27 10:15

    Just stumbled across this post, that was long ago and didn't see the answer I was expecting.

    rake db:schema:load is great for the first time you put a system in production. After that you should run migrations normally.

    This also helps you cleaning your migrations whenever you like, since the schema has all the information to put other machines in production even when you cleaned up your migrations.

提交回复
热议问题