update app to use postgresql