changing sqlite to pg