changed sqlite to pg gem