I’m a bit new to web development so bear with me please. I have a Ruby on Rails project that I have configured to use with a certain database. However, multiple people are going to be working on this project (via SVN repositories), so I’m concerned that the database I’m using, along with all it’s fields, won’t transfer over when some other person checks out a copy. What exactly should I do to circumvent this problem? Do I need to host my database somewhere? Any help is appreciated.
Share
It’s true that every team member on the project will have their own version of the database. The best practice is to set up some test data that covers all of your developed cases in your
db/seeds.rbfile. That way, each developer can run that seeds file, and it will populate their particular database – whether they’re on Mysql, Postgres, Sqlite, or something else. More importantly, that gives you the freedom to reset your database any time you need to, and still have test data to work with.As far as fields go, those will be covered in your migrations – it’s important to run
rake db:migrateany time one of your fellow developers might have made a change to the database schema.