updated to use postgres instead of sqlite3 in production environment.