Introducing DbBranch ------------------- This morning Nate came into my office with an idea for a plugin that facilitated working with Rails, branches, and migrations. He always picks up on some chatter in IRC and thinks up these good ideas. Later in the day we went to lunch together and talked a little bit more about it. 2 hours later we give you [DbBranch](http://github.com/sevenwire/db_branch). ### The problem The problem is simple: you're working away in some branch, you refactor some models and drop some fields, you discover a bug and switch back to master to fix it but your application behaves differently because your database is on a different schema version. Now you have to recreate your database, fix the bug, and migrate it up again when switching back to your topic branch. Not very efficient. ### The solution With DbBranch, each branch will get its own database to work with so you can switch between branches and just pick up where you left off. All that is needed is one simple command `rake db:branch:create`. ### How it works
   1  git checkout -b topic_branch
   2  rake db:branch:create  # Using project_development_topic_branch db
   3  ./script/generate migration drop_some_fields
   4  rake db:migrate  # Migrated project_development_topic_branch db
   5  git commit -a -v
   6  git checkout master  # Using project_development db

rake db:branch:create will create a new YAML file in config called database.branch.[branch_name].yml, change the database names to [application]_[environment]_[branch], create all of the databases defined in the YAML file, load the schema, and prepare the test database. Then you can go on your merry way creating migrations without fear of difficulty when switching between your branches.

Most agencies want to build it, bill it, and move on. Not us. We’re in it for the long haul. Nearly every client we’ve ever had is still our client and those applications are still running at full speed.

PROJECTS

FlixCloud - On-demand Video Encoding Red Is White - Christian T-Shirts