changed database adapter to postgres