News for hackers. Stuff that matters.
Re:Fork Your Application's Data (Not Just Your Code) by grey-area on Friday November 09, 2012 @03:00AM (#4761844)
Keep your database config for the app in version control with the code, and change to another database per branch.

This means your data in that db will diverge from the main branch slightly, but if that is too much of a problem and you need constant updates from live, you could look into migrations like those used by rails, which store your db changes so that they can be replayed on top of newer data from master and bring it up to the new schema. It's quite easy to setup a bare bones migration system using plain SQL migration files and some scripts if this is a problem you see often.

I often work with several branches of code in rails, and it's not a big problem, you just need a system for keeping the data in sync with the code.

There are no comments on this comment yet.