changed db adapted to pg