updates gemfile to use pg
updates database.yml
Fixes migrations
Fixes query