moves from using sqlite3 to postgres for the database