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 in is causing all sorts of spurious conflicts that are easily resolved by a fresh db:migrate:reset
.
Basically I want a way to:
- Keep schema.rb in the repository for deploy-time database setup
- Keep schema.rb in '.gitignore' for general development
There would be one or two people responsible for updating schema.rb
and knowing that it was correct.
Is there a way I can have my cake and eat it, too?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…