Making the app work with postgres