Currently I’m working on a Rails project, where I keep on constantly switching between the deployable master branch, and then many other branches, where I implement new features.
The problem is, that usually these features add some tables to the database, which means every time I switch a branch, I have to drop the database, migrate and then populate it with some dummy data.
I can do this in about two to three steps, since I have a rake task that creates all the dummy data again, but it’s not very fast (couple of minutes). It’s not the worst wait time ever, but I’d like to know if there are any alternative solutions, where I don’t have to recreate the database every time I checkout a branch.
I’m currently using MySQL on my development machine.
Why don’t keep the databases for each branch and just switch the connection strings.