change db to use postgres instead of sqlite3