modified database.rb, setup postgres database