Fix/migrations

The migrations had some issues left from previous PRs, those problems somehow made it into feature/rails3 despite review. This PR fixes them.