In the autogenerated .gitignore file (rails source = http://goo.gl/Pc6Sp<http://goo.gl/Pc6Sp>), database.yml is *NOT* git ignored. I''d suggest 1) add "config/database.yml" to the .gitignore .gitignore. 2) keep generated "config/database.yml" the exact same - no change. 3) generate a new file, "config/database.yml.sample", which would be presumably version controlled. Also inlcude simple explanation for presence of database.yml/database.yml.sample, and strongly suggest not version controller actual database.yml. If this sounds good, I''ll PR the code. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-core/-/68pSy0QVvKQJ. To post to this group, send email to rubyonrails-core@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
This has been suggested (and rejected) several times before. Most recently: https://groups.google.com/forum/#!topic/rubyonrails-core/7HB0wdRzfVE https://github.com/rails/rails/pull/7870 On Fri, Jan 11, 2013 at 12:38 AM, Weston Platter <westonplatter@gmail.com>wrote:> In the autogenerated .gitignore file (rails source = http://goo.gl/Pc6Sp<http://goo.gl/Pc6Sp>), > database.yml is *NOT* git ignored. > > I''d suggest > 1) add "config/database.yml" to the .gitignore .gitignore. > 2) keep generated "config/database.yml" the exact same - no change. > 3) generate a new file, "config/database.yml.sample", which would be > presumably version controlled. > > Also inlcude simple explanation for presence of > database.yml/database.yml.sample, and strongly suggest not version > controller actual database.yml. > > If this sounds good, I''ll PR the code. > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Core" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/rubyonrails-core/-/68pSy0QVvKQJ. > To post to this group, send email to rubyonrails-core@googlegroups.com. > To unsubscribe from this group, send email to > rubyonrails-core+unsubscribe@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/rubyonrails-core?hl=en. >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
This has been discussed a few times in the past. Whether having database.yml in the repo is a risk or not depends on the context of the team, and indeed many people leave it in the repo because it is OK for them. On another hand, we want to generate new applications that just run, that''s why the default database is SQLite. Teams that want that .sample indirection can just implement it. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.