What is the preferred way to manage schema.rb in git?

前端 未结 8 915
醉酒成梦
醉酒成梦 2020-12-01 07:05

I don\'t want to add schema.rb to .gitignore, because I want to be able to load a new database schema from that file. However, keeping it checked

8条回答
  •  栀梦
    栀梦 (楼主)
    2020-12-01 07:57

    Would it be sufficient to do a rake db:dump in a pre-commit git hook?

    The following won't necessarily fix (1) or (2), but it might take care of the merging issue, and then maybe (1) and (2) go away.

提交回复
热议问题