update db to pg