What is the right approach to deal with Rails db/schema.rb file in GIT?

后端 未结 4 1482
南旧
南旧 2020-12-03 04:10

Should we include schema.rb while commiting to GIT? or should we ignore it? what is the right approach?

4条回答
  •  孤城傲影
    2020-12-03 05:06

    Yes. The schema file is used to configure your database when using rake db:reset and other commands. Migrations should only be used when changing the database schema and will always result in a new schema file.

提交回复
热议问题