Change sqlite to pg