Fixing DB/postgreSQL related issues for correct deployment on Herokus.