update database to pg